Show More
@@ -146,10 +146,10 b' def runcmd(cmd, env):' | |||
|
146 | 146 | p = subprocess.Popen(cmd, stdout=subprocess.PIPE, |
|
147 | 147 | stderr=subprocess.PIPE, env=env) |
|
148 | 148 | out, err = p.communicate() |
|
149 | return out, err | |
|
149 | return p.returncode, out, err | |
|
150 | 150 | |
|
151 | 151 | def runhg(cmd, env): |
|
152 | out, err = runcmd(cmd, env) | |
|
152 | returncode, out, err = runcmd(cmd, env) | |
|
153 | 153 | # If root is executing setup.py, but the repository is owned by |
|
154 | 154 | # another user (as in "sudo python setup.py install") we will get |
|
155 | 155 | # trust warnings since the .hg/hgrc file is untrusted. That is |
@@ -159,7 +159,7 b' def runhg(cmd, env):' | |||
|
159 | 159 | if not e.startswith(b'not trusting file') \ |
|
160 | 160 | and not e.startswith(b'warning: Not importing') \ |
|
161 | 161 | and not e.startswith(b'obsolete feature not enabled')] |
|
162 | if err: | |
|
162 | if err or returncode != 0: | |
|
163 | 163 | printf("stderr from '%s':" % (' '.join(cmd)), file=sys.stderr) |
|
164 | 164 | printf(b'\n'.join([b' ' + e for e in err]), file=sys.stderr) |
|
165 | 165 | return '' |
@@ -404,8 +404,8 b' class buildhgextindex(Command):' | |||
|
404 | 404 | # here no extension enabled, disabled() lists up everything |
|
405 | 405 | code = ('import pprint; from mercurial import extensions; ' |
|
406 | 406 | 'pprint.pprint(extensions.disabled())') |
|
407 | out, err = runcmd([sys.executable, '-c', code], env) | |
|
408 | if err: | |
|
407 | returncode, out, err = runcmd([sys.executable, '-c', code], env) | |
|
408 | if err or returncode != 0: | |
|
409 | 409 | raise DistutilsExecError(err) |
|
410 | 410 | |
|
411 | 411 | with open(self._indexfilename, 'w') as f: |
General Comments 0
You need to be logged in to leave comments.
Login now