I am using "fossil version 1.22 [5dd5d39e7c] 2012-03-19 12:45:47 UTC"
compiled with JSON API.
In general whenever a "fossil json xxx" command fails the exit code is not
zero. But sometimes "user xxx" subcommands return zero (success) even when
they fail.
For example the following is expected to exit with failure otherwise you
would look for "payload" attribute and not a "returnCode" attribute.
steve@VaioLx:~/sandbox/research/repo$ fossil json user new fred -R
repo.fossil
{
"fossil":"5dd5d39e7cc76dccd77f881eaedbf693d0a0a667",
"timestamp":1340523230,
"resultCode":"FOSSIL-1102",
"resultText":"Unknown subcommand: new",
"command":"user",
"procTimeMs":4
}
steve@VaioLx:~/sandbox/research/repo$ echo $?
0
Note that if "repo.fossil" file doesn't exist it will exit with 1.
Steve
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users