changegroup: move sorting down into group
authorMatt Mackall <mpm@selenic.com>
Mon, 28 Mar 2011 11:18:56 -0500
changeset 13784 f1e639c71a2b
parent 13783 c196352d935b
child 13785 470ec600b525
changegroup: move sorting down into group
mercurial/localrepo.py
mercurial/revlog.py
--- a/mercurial/localrepo.py	Mon Mar 28 11:18:56 2011 -0500
+++ b/mercurial/localrepo.py	Mon Mar 28 11:18:56 2011 -0500
@@ -1558,7 +1558,7 @@
                                  unit=_('manifests'), total=changecount)
                 return mfs[x]
 
-            for chunk in mf.group(sorted(mfs, key=mf.rev), mlookup):
+            for chunk in mf.group(mfs, mlookup):
                 yield chunk
             self.ui.progress(_('bundling'), None)
 
@@ -1590,8 +1590,7 @@
                             unit=_('files'), total=efiles)
                         return missingfnodes[x]
 
-                    for chunk in filerevlog.group(
-                        sorted(missingfnodes, key=filerevlog.rev), flookup):
+                    for chunk in filerevlog.group(missingfnodes, flookup):
                         yield chunk
             # Signal that no more groups are left.
             yield changegroup.closechunk()
--- a/mercurial/revlog.py	Mon Mar 28 11:18:56 2011 -0500
+++ b/mercurial/revlog.py	Mon Mar 28 11:18:56 2011 -0500
@@ -1070,7 +1070,7 @@
         changegroup starts with a full revision.
         """
 
-        revs = [self.rev(n) for n in nodelist]
+        revs = sorted([self.rev(n) for n in nodelist])
 
         # if we don't have any revisions touched by these changesets, bail
         if not revs: