changeset 13784:f1e639c71a2b

changegroup: move sorting down into group
author Matt Mackall <mpm@selenic.com>
date Mon, 28 Mar 2011 11:18:56 -0500
parents c196352d935b
children 470ec600b525
files mercurial/localrepo.py mercurial/revlog.py
diffstat 2 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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: