changeset 8391:27bffd81d265

revlog: slightly tune group() by not going rev->node->rev
author Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
date Thu, 14 May 2009 16:00:21 +0200
parents beae42f3d93b
children 7e5cbb09515b
files mercurial/revlog.py
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revlog.py	Thu May 14 15:35:46 2009 +0200
+++ b/mercurial/revlog.py	Thu May 14 16:00:21 2009 +0200
@@ -1149,16 +1149,17 @@
         have this parent as it has all history before these
         changesets. parent is parent[0]
         """
-        revs = [self.rev(n) for n in nodelist]
 
         # if we don't have any revisions touched by these changesets, bail
-        if not revs:
+        if not nodelist:
             yield changegroup.closechunk()
             return
 
+        revs = [self.rev(n) for n in nodelist]
+
         # add the parent of the first rev
-        p = self.parents(self.node(revs[0]))[0]
-        revs.insert(0, self.rev(p))
+        p = self.parentrevs(revs[0])[0]
+        revs.insert(0, p)
 
         # build deltas
         for d in xrange(0, len(revs) - 1):