[pypy-svn] pypy default: it's a bit hard to test this :-(, but use '?' for hgid and tags in case the hg executable fails
antocuni
commits-noreply at bitbucket.org
Thu Jan 20 12:33:58 CET 2011
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch:
Changeset: r40979:6a61283100bd
Date: 2011-01-18 14:19 +0100
http://bitbucket.org/pypy/pypy/changeset/6a61283100bd/
Log: it's a bit hard to test this :-(, but use '?' for hgid and tags in
case the hg executable fails
diff --git a/pypy/tool/version.py b/pypy/tool/version.py
--- a/pypy/tool/version.py
+++ b/pypy/tool/version.py
@@ -50,11 +50,15 @@
stdout=PIPE, stderr=PIPE, env=env)
hgid = p.stdout.read().strip()
maywarn(p.stderr.read())
+ if p.wait() != 0:
+ hgid = '?'
p = Popen([str(hgexe), 'id', '-t', pypyroot],
stdout=PIPE, stderr=PIPE, env=env)
hgtags = [t for t in p.stdout.read().strip().split() if t != 'tip']
maywarn(p.stderr.read())
+ if p.wait() != 0:
+ hgtags = ['?']
if hgtags:
return 'PyPy', hgtags[0], hgid
More information about the Pypy-commit
mailing list