diff options
Diffstat (limited to 'setuptools/command')
| -rwxr-xr-x | setuptools/command/egg_info.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 68e2fefb..5e5686a3 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -134,13 +134,16 @@ class egg_info(Command): def get_svn_revision(self): - stdin, stdout = os.popen4("svn info"); stdin.close() + stdin, stdout = os.popen4("svn info -R"); stdin.close() result = stdout.read(); stdout.close() import re - match = re.search(r'Last Changed Rev: (\d+)', result) - if not match: + revisions = [ + int(match.group(1)) + for match in re.finditer(r'Last Changed Rev: (\d+)', result) + ] + if not revisions: raise DistutilsError("svn info error: %s" % result.strip()) - return match.group(1) + return str(max(revisions)) def write_toplevel_names(self): @@ -159,9 +162,6 @@ class egg_info(Command): - - - def write_namespace_packages(self): nsp = getattr(self.distribution,'namespace_packages',None) if nsp is None: |
