Patchwork [3,of,4,lazymanifest,v5] context: don't sort manifest entries

login
register
mail settings
Submitter Augie Fackler
Date March 6, 2015, 9:42 p.m.
Message ID <0d6081e07050c5c8e5c3.1425678161@arthedain.pit.corp.google.com>
Download mbox | patch
Permalink /patch/7912/
State Superseded
Commit 8ec2df32bd39aa74d77d6b094b7c15ba5236ed81
Headers show

Comments

Augie Fackler - March 6, 2015, 9:42 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1416200425 18000
#      Mon Nov 17 00:00:25 2014 -0500
# Node ID 0d6081e07050c5c8e5c31756b7a5679e7eb524c1
# Parent  fce65813a0d09a4c4964b987231d7c2de8d9754f
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