[PATCH] bisect: use subprocess to get command return code

Alexander Solovyov piranha at piranha.org.ua
Sun May 3 02:38:13 CDT 2009


# HG changeset patch
# User Alexander Solovyov <piranha at piranha.org.ua>
# Date 1241336288 -10800
# Node ID 36c704b0e7abee0083ed8ea579f126aac2bee3cf
# Parent  d6134b800797e5082e909802e55d03dba1bcad19
bisect: use subprocess to get command return code

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -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 @@ def bisect(ui, repo, rev=None, extra=Non
         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:


More information about the Mercurial-devel mailing list