[pypy-svn] r58774 - pypy/branch/2.5-merge/pypy/module/sys
arigo at codespeak.net
arigo at codespeak.net
Tue Oct 7 17:38:48 CEST 2008
Author: arigo
Date: Tue Oct 7 17:38:48 2008
New Revision: 58774
Modified:
pypy/branch/2.5-merge/pypy/module/sys/version.py
Log:
Oups! Fix this. It crashes with https or svn+ssh checkouts.
Modified: pypy/branch/2.5-merge/pypy/module/sys/version.py
==============================================================================
--- pypy/branch/2.5-merge/pypy/module/sys/version.py (original)
+++ pypy/branch/2.5-merge/pypy/module/sys/version.py Tue Oct 7 17:38:48 2008
@@ -10,7 +10,7 @@
PYPY_VERSION = (1, 0, 0, "alpha", '?')
# the last item is replaced by the svn revision ^^^
-SVN_URL_HEAD = 'http://codespeak.net/svn/pypy/'
+TRIM_URL_UP_TO = 'svn/pypy/'
SVN_URL = "$HeadURL$"[10:-28]
REV = "$LastChangedRevision$"[22:-2]
@@ -50,8 +50,10 @@
return space.wrap((SVN_URL, svn_revision()))
def get_subversion_info(space):
- assert SVN_URL.startswith(SVN_URL_HEAD)
- svnbranch = SVN_URL[len(SVN_URL_HEAD):].strip('/')
+ svnbranch = SVN_URL
+ if TRIM_URL_UP_TO in svnbranch:
+ svnbranch = svnbranch.split(TRIM_URL_UP_TO, 1)[1]
+ svnbranch = svnbranch.strip('/')
return space.newtuple([space.wrap('PyPy'),
space.wrap(svnbranch),
space.wrap(str(svn_revision()))])
More information about the Pypy-commit
mailing list