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

login
register
mail settings
Submitter Augie Fackler
Date Feb. 6, 2015, 11:24 p.m.
Message ID <b436d0343da36fd8b511.1423265068@130.17.16.172.in-addr.arpa>
Download mbox | patch
Permalink /patch/7728/
State Superseded
Commit 8ec2df32bd39aa74d77d6b094b7c15ba5236ed81
Headers show

Comments

Augie Fackler - Feb. 6, 2015, 11:24 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1416200425 18000
#      Mon Nov 17 00:00:25 2014 -0500
# Node ID b436d0343da36fd8b511754cae10d579de6b6318
# Parent  8f5634aec154113442966c0dd78d74f758cc1e41
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