mercurial exit codes

Matt Mackall mpm at selenic.com
Fri Jun 5 22:40:45 CDT 2009


On Fri, 2009-06-05 at 23:17 -0400, Greg Ward wrote:
> On Fri, Jun 5, 2009 at 8:22 AM, <mail at fabiantriefenbach.de> wrote:
> > can I find a documentation of the hg commands and their return values?
> > I'm writing a lot batchfiles to automate a workflow on windows and
> > would like to use the %errorlevel% variable after calling hg commands.
> > But I'm a bit confused which values to expect. So, maybe youcan help me
> > out which commands return a value and under which conditions? Do you
> > return more than just an error/no error information?
> 
> Unfortunately, this appears to be a bit haphazard and undisciplined.
> And undocumented AFAIK.  Have you searched the wiki?  You might do the
> community a service and create a wiki page to document this stuff.
> The best source of information is the souce code:
> mercurial/commands.py.  The exit status of a command "hg foo" is the
> return value of function foo() in that module.

We tend to get this question about once a release cycle when everyone's
too busy to devote any time to it. If someone wants to
document/rationalize the return codes, they're welcome to do it. It's a
good beginner project. Otherwise, it's not likely to happen.

-- 
http://selenic.com : development and support for Mercurial and Linux




More information about the Mercurial mailing list