[Python-checkins] python/nondist/sandbox/setuptools/setuptools/command egg_info.py, 1.6, 1.7
pje@users.sourceforge.net
pje at users.sourceforge.net
Sat Jul 16 18:43:04 CEST 2005
Update of /cvsroot/python/python/nondist/sandbox/setuptools/setuptools/command
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26365/setuptools/command
Modified Files:
egg_info.py
Log Message:
Fix only detecting the revision number of the setup directory, not the
highest revision number for the project as a whole.
Index: egg_info.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/setuptools/setuptools/command/egg_info.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- egg_info.py 10 Jul 2005 15:43:08 -0000 1.6
+++ egg_info.py 16 Jul 2005 16:43:02 -0000 1.7
@@ -134,13 +134,16 @@
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 @@
-
-
-
def write_namespace_packages(self):
nsp = getattr(self.distribution,'namespace_packages',None)
if nsp is None:
More information about the Python-checkins
mailing list