Hi, all, i've started to implement /json/artifact, which is analogous to the /info, /vinfo, etc. family of functions (but consolidated into one interface). It is called like this:
/json/artifact/ID or /json/artifact?uuid=ID where ID may be any artifact ID or tag (in which case it resolves to the newest artifact with that tag). It currently only handles "commit" artifacts - tickets, wikis, etc. are TODO. The response looks like: [stephan@cheyenne:~/cvs/fossil/fossil-json]$ ./fossil json artifact json -I 2 # 2nd "json"==tag name { "fossil":"22fc0ab81bf965cad657992932d559850a79bd8a", "timestamp":1317453248, "procTimeMs":1, "payload":{ "type":"checkin", /* name = uuid arg provided (may resolve to something different - see artifact.uuid) */ "name":"json", "rid":14023, /* artifact property has artifact-type-dependent structure ... this one is for "checkin" artifacts...*/ "artifact":{ "isLeaf":true, "uuid":"22fc0ab81bf965cad657992932d559850a79bd8a", "user":"stephan", "comment":"more timeline/artifact refactoring.", "mtime":1317452671, /* if the artifact has been edited, the original comment/mtime/user are also included */ "parentUuid":"b1f9257213c4447b0a072e73f7845b43e85074cd", "tags":[ "json", "json-multitag-test" ], "files":[ { "name":"src/json_artifact.c", "uuid":"9a3cded924b5fb1aaffb6f09f220cdef4369107f", "prevUuid":"59606a8986e68cac5bf0fe13971004759c535345", "state":"modified" }, { "name":"src/json_timeline.c", "uuid":"9b9bf636eb7b5bfd77d4e538fb7ee5c06b306e44", "prevUuid":"8552eb9bdb9f64d9bc01fbd5b92f9f251110fb18", "state":"modified" } ] } } } My questions include (but are not necessarily limited to): a) Is that structure acceptable (or close) for checkin artifacts? b) are there any strong opinions on what the structures for other artifact types should look like? If not, i will be modelling them off of the analogous /Xinfo page. You can play around with this at: http://fossil.wanderinghorse.net/repos/fossil-sgb/json/index.html Look for a button labeled "artifact/XYZ". To try different branches/IDs, edit the "Request" field after clicking the artifact/XYZ button once, then click Send. :-? -- ----- stephan beal http://wanderinghorse.net/home/stephan/
_______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users