On Tue, Feb 19, 2013 at 8:01 PM, Pirate Fibonacci <[email protected]>wrote:

> <<<<<< data Items I would like to see in the payload. thanks...
>>
> "branch":"trunk",
>                     "add": ["add_file_1", "add_file_2"],
>                     "edit": ["edited_file_1", "edited_file_2"],
>                     "extra": ["extra_file_1", "extra_file_2"],
>                     "tags": ["tag_name_one", "tag_name_two"],
>
>> >>>>>>>>>
>>
>
Hiho,

i experimented with this structure and went for a different one because the
above requires that one know all available stati in advance in order to
process the list. Note that "extra" is not handled here, for reasons
explained in other posts.

The output currently looks like:

[stephan@host:~/cvs/fossil/fossil]$ f json status -I 2
{
...
   "payload":{
    "repository":"/home/stephan/cvs/fossil/fossil.fsl",
    "localRoot":"/home/stephan/cvs/fossil/fossil/",
    "checkout":{
      "uuid":"b38bb4f9bd27d0347b62ecfac63c4b8f57b5c93b",
      "tags":["trunk"],
      "datetime":"2013-02-22 17:34:19 UTC",
      "timestamp":1361554459
    },
    "files":[
      {
        "name":"src/checkin.c",
        "status":"edited"
      }, ...
    ],
    "errorCount":0
  }
}

Notes:

- The info for the parent check is currently missing (TODO).

- checkout.tag property: the framework-wide convention for tag lists like
this is that the first tag in the list is the primary branch and any others
are secondary.

- errorCount is +1 for each missing file. Conflicts are not treated as
errors because the CLI 'status' command does not treat them as such (not
sure why).

- "merged with" info for the checkout is currently missing.

- The "datetime" property is something new i'm trying and will likely
expand its use through the API to supplement (not replace) the
framework-convention "timestamp" property (which uses Unix Epoch time,
which isn't all that useful for human beings but is portable to just about
any JSON-consuming platform without requiring special parsing).

- i have left out the option of (and code for) using relative paths because
i honestly don't see that as being terribly useful in this context.


This will be committed in the next half our or so.

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to