diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2013-05-04 00:06:18 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2013-05-04 00:06:18 -0400 |
commit | e8dbb411b4c6e282b6848066dcbac3ced6d3a880 (patch) | |
tree | a907463f6bd7365682a3e7306b864c14f93c780e /setuptools/command/egg_info.py | |
parent | 3b7000ad8a3eba032d4d2654e31ae64c976cb494 (diff) | |
parent | ff75a6cbdbcde8d9e3b979c30c3d6e64a1bc5374 (diff) | |
download | external_python_setuptools-e8dbb411b4c6e282b6848066dcbac3ced6d3a880.tar.gz external_python_setuptools-e8dbb411b4c6e282b6848066dcbac3ced6d3a880.tar.bz2 external_python_setuptools-e8dbb411b4c6e282b6848066dcbac3ced6d3a880.zip |
Merge setuptools/command/*
--HG--
branch : Setuptools-Distribute merge
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 0c2ea0cc..cd3ea198 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -224,18 +224,21 @@ class egg_info(Command): data = f.read() f.close() - if data.startswith('10') or 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' or '10' 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): @@ -248,9 +251,6 @@ class egg_info(Command): - - - def find_sources(self): """Generate SOURCES.txt manifest file""" manifest_filename = os.path.join(self.egg_info,"SOURCES.txt") |