[pypy-svn] r69190 - pypy/trunk/pypy/module/sys
antocuni at codespeak.net
antocuni at codespeak.net
Wed Nov 11 18:22:43 CET 2009
Author: antocuni
Date: Wed Nov 11 18:22:42 2009
New Revision: 69190
Modified:
pypy/trunk/pypy/module/sys/version.py
Log:
it seems that my svn version (1.6.5) uses the new format for .svn, but it does
not store a 'format' file with the version inside. Make the code assume the
new format is 'format' is not there.
Modified: pypy/trunk/pypy/module/sys/version.py
==============================================================================
--- pypy/trunk/pypy/module/sys/version.py (original)
+++ pypy/trunk/pypy/module/sys/version.py Wed Nov 11 18:22:42 2009
@@ -87,10 +87,15 @@
# to depend on an external 'svn' executable in the path.
rev = int(REV)
try:
- f = open(os.path.join(pypydir, '.svn', 'format'), 'r')
- format = int(f.readline().strip())
- f.close()
- if format <= 6: # Old XML-format
+ formatfile = os.path.join(pypydir, '.svn', 'format')
+ if os.path.exists(formatfile):
+ f = open(formatfile, 'r')
+ format = int(f.readline().strip())
+ f.close()
+ oldformat = (format <= 6) # Old XML-format
+ else:
+ oldformat = False
+ if oldformat:
f = open(os.path.join(pypydir, '.svn', 'entries'), 'r')
for line in f:
line = line.strip()
More information about the Pypy-commit
mailing list