Patchwork D6363: context: move walk() and match() overrides from committablectx to workingctx

login
register
mail settings
Submitter phabricator
Date May 15, 2019, 6:03 p.m.
Message ID <890f98eb2d58a12b51b11df71744e385@localhost.localdomain>
Download mbox | patch
Permalink /patch/40053/
State Not Applicable
Headers show

Comments

phabricator - May 15, 2019, 6:03 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG4fbfc893e6b9: context: move walk() and match() overrides from committablectx to workingctx (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6363?vs=15057&id=15105

REVISION DETAIL
  https://phab.mercurial-scm.org/D6363

AFFECTED FILES
  mercurial/context.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -1209,17 +1209,6 @@ 
         """return the "best" ancestor context of self and c2"""
         return self._parents[0].ancestor(c2) # punt on two parents for now
 
-    def walk(self, match):
-        '''Generates matching file names.'''
-        return sorted(self._repo.dirstate.walk(self._repo.narrowmatch(match),
-                                               subrepos=sorted(self.substate),
-                                               unknown=True, ignored=False))
-
-    def matches(self, match):
-        match = self._repo.narrowmatch(match)
-        ds = self._repo.dirstate
-        return sorted(f for f in ds.matches(match) if ds[f] != 'r')
-
     def ancestors(self):
         for p in self._parents:
             yield p
@@ -1656,6 +1645,17 @@ 
             match.bad = bad
         return match
 
+    def walk(self, match):
+        '''Generates matching file names.'''
+        return sorted(self._repo.dirstate.walk(self._repo.narrowmatch(match),
+                                               subrepos=sorted(self.substate),
+                                               unknown=True, ignored=False))
+
+    def matches(self, match):
+        match = self._repo.narrowmatch(match)
+        ds = self._repo.dirstate
+        return sorted(f for f in ds.matches(match) if ds[f] != 'r')
+
     def markcommitted(self, node):
         super(workingctx, self).markcommitted(node)