[PATCH]os.WIFxxx not suported on windows

Volker Kleinfeld volker.kleinfeld at gmx.de
Mon Aug 22 04:10:57 CDT 2005


patch is update and attached.

Volker
> It's good to conserve indentation levels. Please change:
>
> if x:
>   return
> else:
>   ...
>
> to:
>
> if x:
>   return
> 
> ...

>> Hi,
>> 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.

-- 
5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail
+++ GMX - die erste Adresse für Mail, Message, More +++
-------------- next part --------------
# HG changeset patch
# User Volker.Kleinfeld at gmx.de
# Node ID af087058a683e263d56dfbf09b15288408faf8b4
# Parent  4cabedfab66eaaff5e2f36739ca6823c4402a4c8
Fixed system command abord reason on windows.

diff -r 4cabedfab66e -r af087058a683 mercurial/util.py
--- a/mercurial/util.py	Fri Aug 19 14:41:29 2005
+++ b/mercurial/util.py	Mon Aug 22 09:02:16 2005
@@ -269,6 +269,8 @@
 
     def explain_exit(code):
         """return a 2-tuple (desc, code) describing a process's status"""
+        if os.name == 'nt': # os.WIFxx is not supported on windows
+            return "aborted with error." , -1
         if os.WIFEXITED(code):
             val = os.WEXITSTATUS(code)
             return "exited with status %d" % val, val


More information about the Mercurial mailing list