Patchwork [3,of,4,v4,lazy-manifest] context: don't sort manifest entries

login
register
mail settings
Submitter Augie Fackler
Date March 3, 2015, 11:05 p.m.
Message ID <4d339f4b677cf8890e9c.1425423936@198.17.16.172.in-addr.arpa>
Download mbox | patch
Permalink /patch/7888/
State Superseded
Headers show

Comments

Augie Fackler - March 3, 2015, 11:05 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1416200425 18000
#      Mon Nov 17 00:00:25 2014 -0500
# Node ID 4d339f4b677cf8890e9cfee61b794376ae9960ed
# Parent  4087ba22f339685d731c4a5607d1131a1676eb19
context: don't sort manifest entries

The manifest iterator is now pre-sorted, so we can skip this check.

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -66,8 +66,7 @@  class basectx(object):
         return self.filectx(key)
 
     def __iter__(self):
-        for f in sorted(self._manifest):
-            yield f
+        return iter(self._manifest)
 
     def _manifestmatches(self, match, s):
         """generate a new manifest filtered by the match argument