[cig-commits] r14997 - cs/merlin/branches/v1/merlin/command
leif at geodynamics.org
leif at geodynamics.org
Thu May 14 17:51:17 PDT 2009
Author: leif
Date: 2009-05-14 17:51:17 -0700 (Thu, 14 May 2009)
New Revision: 14997
Modified:
cs/merlin/branches/v1/merlin/command/egg_info.py
cs/merlin/branches/v1/merlin/command/sdist.py
Log:
Added support for the new .svn/entries format introduced in Subversion
v1.6. See http://bugs.python.org/setuptools/issue64.
Modified: cs/merlin/branches/v1/merlin/command/egg_info.py
===================================================================
--- cs/merlin/branches/v1/merlin/command/egg_info.py 2009-05-14 23:22:29 UTC (rev 14996)
+++ cs/merlin/branches/v1/merlin/command/egg_info.py 2009-05-15 00:51:17 UTC (rev 14997)
@@ -217,14 +217,14 @@
data = f.read()
f.close()
- if data.startswith('9') or data.startswith('8'):
+ if data.startswith('<?xml'):
+ dirurl = urlre.search(data).group(1) # get repository URL
+ localrev = max([int(m.group(1)) for m in revre.finditer(data)]+[0])
+ elif data[0] in "0123456789":
data = map(str.splitlines,data.split('\n\x0c\n'))
- del data[0][0] # get rid of the '8' or '9'
+ del data[0][0] # get rid of the version number
dirurl = data[0][3]
localrev = max([int(d[9]) for d in data if len(d)>9 and d[9]]+[0])
- elif data.startswith('<?xml'):
- dirurl = urlre.search(data).group(1) # get repository URL
- localrev = max([int(m.group(1)) for m in revre.finditer(data)]+[0])
else:
from warnings import warn
warn("unrecognized .svn/entries format; skipping "+base)
Modified: cs/merlin/branches/v1/merlin/command/sdist.py
===================================================================
--- cs/merlin/branches/v1/merlin/command/sdist.py 2009-05-14 23:22:29 UTC (rev 14996)
+++ cs/merlin/branches/v1/merlin/command/sdist.py 2009-05-15 00:51:17 UTC (rev 14997)
@@ -86,14 +86,14 @@
f = open(filename,'rU')
data = f.read()
f.close()
- if data.startswith('9') or data.startswith('8'): # subversion 1.5/1.4
+ if data.startswith('<?xml'):
+ for match in entries_pattern.finditer(data):
+ yield joinpath(dirname,unescape(match.group(1)))
+ elif data[0] in "0123456789":
for record in map(str.splitlines, data.split('\n\x0c\n')[1:]):
if not record or len(record)>=6 and record[5]=="delete":
continue # skip deleted
yield joinpath(dirname, record[0])
- elif data.startswith('<?xml'):
- for match in entries_pattern.finditer(data):
- yield joinpath(dirname,unescape(match.group(1)))
else:
from warnings import warn
warn("unrecognized .svn/entries format in "+dirname)
More information about the CIG-COMMITS
mailing list