[PATCH]os.WIFxxx not suported on windows

volker.kleinfeld at gmx.de volker.kleinfeld at gmx.de
Tue Aug 30 11:51:55 CDT 2005

> * Volker Kleinfeld <volker.kleinfeld at gmx.de> [20050822 11:25]:
> > >> when util.system fails "explain_exit(code)" is called. This method
> > >> os.WIFxx which is not supported on windows. Attached a small patch
> > >> 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
> > 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
> else:
>     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
> util.py
> Thomas

Hi Thomas,
you are right this is dead code. I had found the problem on the 0.6b version
and I checked on 0.6b the issue was still there. Obviously when I finaly
delivered the patch the problem had been solved already.


More information about the Mercurial mailing list