[PATCH]os.WIFxxx not suported on windows

Thomas Arendsen Hein thomas at intevation.de
Mon Aug 29 14:02:14 CDT 2005

* Volker Kleinfeld <volker.kleinfeld at gmx.de> [20050822 11:25]:
> >> when util.system fails "explain_exit(code)" is called. This method uses
> >> os.WIFxx which is not supported on windows. Attached a small patch fixing
> >> it.
> >Have you really seen this error or are just thinking that this might
> >happen?
> it was quite easy for me to run into this case, e.g. if the default editor
> vi can not be found and nothing else is on the environment or hgrc.

This is *very*very* strange, the code in util.py looked like:

# Platform specific variants
if os.name == 'nt':
    def explain_exit(code):
        return "exited with status %d" % code, code
    def explain_exit(code):
        """return a 2-tuple (desc, code) describing a process's status"""
        if os.WIFEXITED(code):

So your added if os.name == 'nt' in the second branch should never
be called.

Can you throw some print "I am here" or "I am there" statements in
util.py to see which if the if or the else part gets executed?

Watch out for DOS line endings or tab characters in your version of


Email: thomas at intevation.de

More information about the Mercurial mailing list