changeset 19552:6b76070c4b54

basectx: move __iter__ from changectx
author Sean Farley <sean.michael.farley@gmail.com>
date Mon, 05 Aug 2013 17:22:18 -0500
parents e07c69145724
children 64a99d972b9e
files mercurial/context.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/context.py	Mon Aug 05 17:22:05 2013 -0500
+++ b/mercurial/context.py	Mon Aug 05 17:22:18 2013 -0500
@@ -59,6 +59,10 @@
     def __getitem__(self, key):
         return self.filectx(key)
 
+    def __iter__(self):
+        for f in sorted(self._manifest):
+            yield f
+
     @propertycache
     def substate(self):
         return subrepo.state(self, self._repo.ui)
@@ -203,10 +207,6 @@
             p = p[:-1]
         return [changectx(self._repo, x) for x in p]
 
-    def __iter__(self):
-        for f in sorted(self._manifest):
-            yield f
-
     def changeset(self):
         return self._changeset
     def manifest(self):