On Wed, Feb 13, 2013 at 6:11 PM, Pirate Fibonacci <[email protected]>wrote:
> with json output I do the following...
>
> $fossil json stat
> {
> ...}
>
>
> I don't get the ADDED, and EDITED files. Also EXTRAS doesn't appear to be
> implemented. i.e. fossil extras
>
Hi!
That's correct, for two reasons:
a) The JSON API is centered on remote use, and remote use does not
(typically) have a checked-out copy immediately available to it. None of
the existing JSON commands know how to deal with a local check-out.
b) The JSON 'stat' command is analog to the /stat page, not the 'status'
command. There is no JSON equivalent to the status command because of point
(a).
> I use this as a check to determine if a commit needs to be done. can we
> get ADDED, EDITED, and EXTRAS added to json output ?
>
i don't see why we can't implement the equivalent the equivalent of
status/changes (they are mostly the same code) for the JSON API, but to be
honest i don't see it being all that useful because (A) remote repos don't
typically have an associated remote checked-out copy and (B) for local use
it is easier to use the non-JSON commands. i'll take a look at porting the
'status' and/or 'changes' command(s) to JSON, but i make no promises - it
depends largely on how invasive adding local-checkout support is to the
JSON framework-level code (e.g. it uses separate exit() paths than CLI/HTTP
mode to avoid causing HTTP 500 results).
or is there an alternate way to determine if we need to perform a fossil
> commit ?
>
Since you're apparently(?) using it from the CLI/shell script, how about
grepping the output of (fossil status)? You might also want to look at
(fossil all changes), but that probably isn't what you're looking for in
this case.
--
----- 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