diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2013-05-03 23:09:46 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2013-05-03 23:09:46 -0400 |
commit | ff75a6cbdbcde8d9e3b979c30c3d6e64a1bc5374 (patch) | |
tree | 6bc72488f8f69a175fcfd3540f0a3ac701b244f5 /setuptools/command/egg_info.py | |
parent | b33cf3e333837cf2fa04af79bcd46094a047741b (diff) | |
download | external_python_setuptools-ff75a6cbdbcde8d9e3b979c30c3d6e64a1bc5374.tar.gz external_python_setuptools-ff75a6cbdbcde8d9e3b979c30c3d6e64a1bc5374.tar.bz2 external_python_setuptools-ff75a6cbdbcde8d9e3b979c30c3d6e64a1bc5374.zip |
Copy changes from 1aae1efe5733 for setuptools/command/* (except easy_install.py
--HG--
branch : Setuptools-Distribute merge
extra : source : 0c89fbb19c269ce1cb3bc3e9ece9864127768169
Diffstat (limited to 'setuptools/command/egg_info.py')
-rwxr-xr-x | setuptools/command/egg_info.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 9741e26a..5a8b2db8 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -217,18 +217,21 @@ class egg_info(Command): 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]) + else: + try: svnver = int(data.splitlines()[0]) + except: svnver=-1 + if data<8: + log.warn("unrecognized .svn/entries format; skipping %s", base) + dirs[:] = [] + continue + data = map(str.splitlines,data.split('\n\x0c\n')) del data[0][0] # get rid of the '8' or '9' 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: - log.warn("unrecognized .svn/entries format; skipping %s", base) - dirs[:] = [] - continue if base==os.curdir: base_url = dirurl+'/' # save the root url elif not dirurl.startswith(base_url): @@ -241,9 +244,6 @@ class egg_info(Command): - - - def find_sources(self): """Generate SOURCES.txt manifest file""" manifest_filename = os.path.join(self.egg_info,"SOURCES.txt") |