[PATCH stable] rebase: add return codes

Sune Foldager cryo at cyanite.org
Thu May 20 15:30:03 CDT 2010


On 20-05-2010 16:11, Jason Harris wrote:
>> If there is nothing to do, then I think that should count as a succesful
>> rebase.
> 
> Well... Right now "pull" with nothing to pull returns exit code 1, which to me still feels wrong but Matt says it makes it easy to code. (I personally don't think this a good reason to issue that exit code.)

It can be very useful for code which needs to, or can benefit from,
knowing if any work was done. For rebase, Dirk has some other code,
perhaps, which uses rebase and wants to know about that.

But... if this code is returned back to the shell, it's maybe a bit
weird... perhaps an 'inner function' should be separated out, and then
IT can return more detailed codes to the outer one.

/Sune


More information about the Mercurial-devel mailing list