Unusual return codes from hg commands
Matt Mackall
mpm at selenic.com
Tue May 5 11:33:23 CDT 2009
On Sun, May 03, 2009 at 12:48:16AM +1000, Peter Williams wrote:
> As you may or may not know, I'm the author of some GUI wrappers for
> mercurial and mercurial queues and I've been noticing (what I think are)
> unusual return codes from some commands when testing in unusual
> conditions. Namely, I'm seeing non zero return values even though the
> command is successful albeit with a warning message.
>
> This leads me to the idea that these return values may be coded to
> indicate the warning level, etc. I've been unable to find anything in
> the mercurial source to verify this hypothesis so I thought I'd ask.
>
> So. Do the non zero return values from the commands have meaning and if
> so where can I find the information to make use of them?
If you take a peek in commands.py for the command you're interested
in, you can probably find the logic that generates the return code.
Lots of these functions have no return and thus yield a 0 return on exit.
We are open to patches to normalize and document return codes that
people care about.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel
mailing list