[Python-checkins] pymigr: When looking up SVN revisions, search through the repo backwards: most

georg.brandl python-checkins at python.org
Thu Feb 24 21:12:35 CET 2011


georg.brandl pushed 356575b1cbd6 to pymigr:

http://hg.python.org/pymigr/rev/356575b1cbd6
changeset:   104:356575b1cbd6
tag:         tip
user:        Georg Brandl <georg at python.org>
date:        Thu Feb 24 21:04:51 2011 +0100
summary:
  When looking up SVN revisions, search through the repo backwards: most looked-up SVN revisions will be relatively recent ones.

files:
  hglookup.py

diff --git a/hglookup.py b/hglookup.py
--- a/hglookup.py
+++ b/hglookup.py
@@ -47,7 +47,7 @@
             svnrev = '@' + node[1:]
             name = 'cpython'
             repo = self.repos[0][1]
-            for rev in repo:
+            for rev in xrange(len(repo)-1, -1, -1):
                 cvt = repo[rev].extra().get('convert_revision', '')
                 if cvt.endswith(svnrev):
                     full = repo[rev].node()

--
Repository URL: http://hg.python.org/pymigr


More information about the Python-checkins mailing list