comparison mercurial/commands.py @ 8284:36c704b0e7ab

bisect: use subprocess to get command return code
author Alexander Solovyov <piranha@piranha.org.ua>
date Sun, 03 May 2009 10:38:08 +0300
parents 602ed4982f36
children 824ed0e35480
comparison
equal deleted inserted replaced
8283:d6134b800797 8284:36c704b0e7ab
6 # GNU General Public License version 2, incorporated herein by reference. 6 # GNU General Public License version 2, incorporated herein by reference.
7 7
8 from node import hex, nullid, nullrev, short 8 from node import hex, nullid, nullrev, short
9 from lock import release 9 from lock import release
10 from i18n import _, gettext 10 from i18n import _, gettext
11 import os, re, sys, textwrap 11 import os, re, sys, textwrap, subprocess
12 import hg, util, revlog, bundlerepo, extensions, copies, context, error 12 import hg, util, revlog, bundlerepo, extensions, copies, context, error
13 import difflib, patch, time, help, mdiff, tempfile, url, encoding 13 import difflib, patch, time, help, mdiff, tempfile, url, encoding
14 import archival, changegroup, cmdutil, hgweb.server, sshserver, hbisect 14 import archival, changegroup, cmdutil, hgweb.server, sshserver, hbisect
15 import merge as merge_ 15 import merge as merge_
16 16
341 commandpath = util.find_exe(command) 341 commandpath = util.find_exe(command)
342 changesets = 1 342 changesets = 1
343 try: 343 try:
344 while changesets: 344 while changesets:
345 # update state 345 # update state
346 status = os.spawnl(os.P_WAIT, commandpath, commandpath) 346 status = subprocess.call([commandpath])
347 if status == 125: 347 if status == 125:
348 transition = "skip" 348 transition = "skip"
349 elif status == 0: 349 elif status == 0:
350 transition = "good" 350 transition = "good"
351 # status < 0 means process was killed 351 # status < 0 means process was killed