[pypy-svn] pypy default: Added support for use outside the PyPy repo.
tav
commits-noreply at bitbucket.org
Thu Mar 3 18:20:32 CET 2011
Author: tav <tav at espians.com>
Branch:
Changeset: r42410:c6d1e8b6dc1f
Date: 2011-03-03 17:20 +0000
http://bitbucket.org/pypy/pypy/changeset/c6d1e8b6dc1f/
Log: Added support for use outside the PyPy repo.
diff --git a/pypy/tool/version.py b/pypy/tool/version.py
--- a/pypy/tool/version.py
+++ b/pypy/tool/version.py
@@ -28,7 +28,7 @@
try:
p = Popen(
[str(gitexe), 'rev-parse', 'HEAD'],
- stdout=PIPE, stderr=PIPE
+ stdout=PIPE, stderr=PIPE, cwd=pypyroot
)
except OSError, e:
maywarn(e, 'Git')
@@ -39,10 +39,13 @@
revision_id = p.stdout.read().strip()[:12]
p = Popen(
[str(gitexe), 'describe', '--tags', '--exact-match'],
- stdout=PIPE, stderr=PIPE
+ stdout=PIPE, stderr=PIPE, cwd=pypyroot
)
if p.wait() != 0:
- p = Popen([str(gitexe), 'branch'], stdout=PIPE, stderr=PIPE)
+ p = Popen(
+ [str(gitexe), 'branch'], stdout=PIPE, stderr=PIPE,
+ cwd=pypyroot
+ )
if p.wait() != 0:
maywarn(p.stderr.read(), 'Git')
return 'PyPy', '?', revision_id
More information about the Pypy-commit
mailing list