bisect: use subprocess to get command return code
authorAlexander Solovyov <piranha@piranha.org.ua>
Sun, 03 May 2009 10:38:08 +0300
changeset 8284 36c704b0e7ab
parent 8283 d6134b800797
child 8285 262738574aff
bisect: use subprocess to get command return code
mercurial/commands.py
--- a/mercurial/commands.py	Sun May 03 00:41:09 2009 +0200
+++ b/mercurial/commands.py	Sun May 03 10:38:08 2009 +0300
@@ -8,7 +8,7 @@
 from node import hex, nullid, nullrev, short
 from lock import release
 from i18n import _, gettext
-import os, re, sys, textwrap
+import os, re, sys, textwrap, subprocess
 import hg, util, revlog, bundlerepo, extensions, copies, context, error
 import difflib, patch, time, help, mdiff, tempfile, url, encoding
 import archival, changegroup, cmdutil, hgweb.server, sshserver, hbisect
@@ -343,7 +343,7 @@
         try:
             while changesets:
                 # update state
-                status = os.spawnl(os.P_WAIT, commandpath, commandpath)
+                status = subprocess.call([commandpath])
                 if status == 125:
                     transition = "skip"
                 elif status == 0: