[darcs-users] Return a failure error code on quitting with "q"
Ganesh Sittampalam
ganesh at earth.li
Fri Aug 23 06:13:33 UTC 2013
Hi Ash,
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.
I can't find any "well-known" error code to indicate "user asked to
abort" at http://stackoverflow.com/a/1535733/96982 - I suppose it would
be better to distinguish the case from other kinds of failure though.
Cheers,
Ganesh
On 17/08/2013 12:32, Ash Moran wrote:
> Hi all
>
> I have a project that I primarily store in darcs, but because I need to send data to a site that uses GitHub web hooks, I have a post-record script that does its best to record each darcs patch as a git commit. I have another script I run to push both the darcs and git changes to their respective remote locations. The slight problem is that if I realise I've made a mistake, and abandon the darcs push by typing "q", darcs exits with a status code 0, so my script has no way to know I want to abort the whole process.
>
> On this basis I was wondering, is there an argument for returning a non-zero status from darcs if the user quits? Or is this considered a "successful" exit, in the sense that nothing went wrong that the user didn't intend?
>
> Thanks
> Ash
>
>
>
> _______________________________________________
> darcs-users mailing list
> darcs-users at darcs.net
> http://lists.osuosl.org/mailman/listinfo/darcs-users
>
More information about the darcs-users
mailing list