[darcs-users] Return a failure error code on quitting with "q"

Ash Moran ash.moran at patchspace.co.uk
Sun Sep 8 20:32:00 UTC 2013


On 23 Aug 2013, at 07:13, Ganesh Sittampalam <ganesh at earth.li> wrote:

> My gut feeling is that it makes sense to have the non-zero code.
> 
> I'm not so sure whether it makes as much sense from things like "darcs
> changes -i" where quitting is pretty much expected, but overall I'd be
> inclined to think it's better to be consistent than to do it command by
> command.

Hmmm, would it make to separate them by "commands" and "queries" (a common OOP distinction)? I haven't looked through all the commands to sanity-check this, but maybe anything that would modify the repo could return a non-zero code on abort, but anything that purely queries it would continue to return 0. Aborting something like "changes -i" seems to come under the sense of "I'm done now, carry on" rather than "eek, I made a mistake, back out and stop everything". "changes -i" is something I'd forgotten about though, so there may be subcommands buried away that don't fit this rule.

Ash


-- 
http://www.patchspace.co.uk/
http://www.linkedin.com/in/ashmoran

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4837 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-users/attachments/20130908/a8c34a85/attachment.p7s>


More information about the darcs-users mailing list