Fossil SCM

fossil-scm / www / json-api / api-checkout.md
Source Blame History 54 lines
85967b7… stephan 1 # JSON API: /status
85967b7… stephan 2 ([⬑JSON API Index](index.md))
85967b7… stephan 3
85967b7… stephan 4 # Status of Local Checkout
85967b7… stephan 5
85967b7… stephan 6 **Status:** implemented 20130223
85967b7… stephan 7
85967b7… stephan 8 **Required permissions:** n/a (local access only)
85967b7… stephan 9
85967b7… stephan 10 **Request:** `/json/status`
85967b7… stephan 11
a3be0b8… drh 12 This command requires a local checkout and is the analog to the "fossil
85967b7… stephan 13 status" command.
85967b7… stephan 14
85967b7… stephan 15 **Request Options:** currently none.
85967b7… stephan 16
85967b7… stephan 17 Payload example:
85967b7… stephan 18
85967b7… stephan 19 ```json
85967b7… stephan 20 {
85967b7… stephan 21 "repository":"/home/stephan/cvs/fossil/fossil.fsl",
85967b7… stephan 22 "localRoot":"/home/stephan/cvs/fossil/fossil/",
85967b7… stephan 23 "checkout":{
85967b7… stephan 24 "uuid":"b38bb4f9bd27d0347b62ecfac63c4b8f57b5c93b",
85967b7… stephan 25 "tags":["trunk"],
85967b7… stephan 26 "datetime":"2013-02-22 17:34:19 UTC",
85967b7… stephan 27 "timestamp":1361554459
85967b7… stephan 28 },
85967b7… stephan 29 /* "parent" info is currently missing. */
85967b7… stephan 30 "files":[
85967b7… stephan 31 {"name":"src/checkin.c", "status":"edited"}
85967b7… stephan 32 ...],
85967b7… stephan 33 "errorCount":0 /* see notes below */
85967b7… stephan 34 }
85967b7… stephan 35 ```
85967b7… stephan 36
85967b7… stephan 37 Notes:
85967b7… stephan 38
85967b7… stephan 39 - The `checkout.tags` property follows the framework-wide convention
85967b7… stephan 40 that the first tag in the list is the primary branch and any others
85967b7… stephan 41 are secondary.
85967b7… stephan 42 - `errorCount` is +1 for each missing file. Conflicts are not treated as
85967b7… stephan 43 errors because the CLI 'status' command does not treat them as such.
2868a0e… stephan 44 - The `"status"` entry for each of the `"files"` entries will be either a
2868a0e… stephan 45 single string containing a single description of the status change, or
2868a0e… stephan 46 an array of strings if more than one change was made, e.g. `"edited"`
2868a0e… stephan 47 and `"renamed"`. The status strings include:\
2868a0e… stephan 48 `deleted`, `new`, `notAFile`, `missing`, `updatedByMerge`,
2868a0e… stephan 49 `updatedByIntegrate`, `addedBymerge`, `addedByIntegrate`,
2868a0e… stephan 50 `conflict`, `edited`, `renamed`
f8d6e8c… mark 51 - File objects with a `"renamed"` status will contain a `"priorName"`
f8d6e8c… mark 52 property in addition to the `"name"` property reported in all cases.
85967b7… stephan 53 - TODO: Info for the parent version is currently missing.
85967b7… stephan 54 - TODO: "merged with" info for the checkout is currently missing.

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button