[PATCH stable] rebase: add return codes

Sune Foldager cryo at cyanite.org
Thu May 20 15:41:31 CDT 2010


On 20-05-2010 17:05, Martin Geisler wrote:
>>> 0: success
>>> 1: nothing to do, unresolved files, no matches, non-fatal errors
>>> 255: abort or other exception
>
> Oh, right, I remember that now. That strategy allows one to use '&&' on
> the command line to mean 'continue if succesful and something happened'.
> Very reasonable.
>
>> [...] I just don't think a pull with nothing to pull should be an
>> abnormal error, or indeed a rebase with nothing to do should do an
>> "abnormal termination".
>
> Yeah, calling it "abnormal termination" makes it sound worse than it is.
> The good old grep(1) has exit code 0 for "lines found", and 1 for "no
> lines found", and 2 for error. The grep(1) man page says that posix
> mandates an exit code great than 1 in case of error.

I guess I should have read this mail before writing the other one. I'm
not really into UNIX command return code history ;-)
/S



More information about the Mercurial-devel mailing list