aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command/egg_info.py
diff options
context:
space:
mode:
authorPJ Eby <distutils-sig@python.org>2005-07-16 16:43:02 +0000
committerPJ Eby <distutils-sig@python.org>2005-07-16 16:43:02 +0000
commit811182ed59bb1b233e2c4589ce15133bd5dad4e5 (patch)
tree58fc74c9276ba8c46975d04d98224211bbf4d694 /setuptools/command/egg_info.py
parent2b761a26e530877facb940fb692938d0bd35131c (diff)
downloadexternal_python_setuptools-811182ed59bb1b233e2c4589ce15133bd5dad4e5.tar.gz
external_python_setuptools-811182ed59bb1b233e2c4589ce15133bd5dad4e5.tar.bz2
external_python_setuptools-811182ed59bb1b233e2c4589ce15133bd5dad4e5.zip
Fix only detecting the revision number of the setup directory, not the
highest revision number for the project as a whole. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041129
Diffstat (limited to 'setuptools/command/egg_info.py')
-rwxr-xr-xsetuptools/command/egg_info.py14
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: