Patchwork [5,of,6,v6,lazy-manifest] context: don't sort manifest entries

login
register
mail settings
Submitter Augie Fackler
Date March 7, 2015, 5:16 p.m.
Message ID <6587f242aaa0732525ed.1425748580@imladris.local>
Download mbox | patch
Permalink /patch/7928/
State Accepted
Headers show

Comments

Augie Fackler - March 7, 2015, 5:16 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1416200425 18000
#      Mon Nov 17 00:00:25 2014 -0500
# Node ID 6587f242aaa0732525ed3f8c2dc61c13dd3dc3ec
# Parent  821f59a10986d380352d4f88f65f9398e3671d4e
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