commitablectx: move walk from workingctx
authorSean Farley <sean.michael.farley@gmail.com>
Wed, 14 Aug 2013 16:37:11 -0500
changeset 19697 8c95e74857c6
parent 19696 210cc42a8ac2
child 19698 8d4a8f4eb404
commitablectx: move walk from workingctx
mercurial/context.py
--- a/mercurial/context.py	Wed Aug 14 16:37:01 2013 -0500
+++ b/mercurial/context.py	Wed Aug 14 16:37:11 2013 -0500
@@ -1034,6 +1034,10 @@
         """return the ancestor context of self and c2"""
         return self._parents[0].ancestor(c2) # punt on two parents for now
 
+    def walk(self, match):
+        return sorted(self._repo.dirstate.walk(match, sorted(self.substate),
+                                               True, False))
+
 class workingctx(commitablectx):
     """A workingctx object makes access to data related to
     the current working directory convenient.
@@ -1065,10 +1069,6 @@
         return workingfilectx(self._repo, path, workingctx=self,
                               filelog=filelog)
 
-    def walk(self, match):
-        return sorted(self._repo.dirstate.walk(match, sorted(self.substate),
-                                               True, False))
-
     def dirty(self, missing=False, merge=True, branch=True):
         "check whether a working directory is modified"
         # check subrepos first