##// END OF EJS Templates
context: move walk() and match() overrides from committablectx to workingctx...
Martin von Zweigbergk -
r42479:4fbfc893 default
parent child Browse files
Show More
@@ -1209,17 +1209,6 b' class committablectx(basectx):'
1209 1209 """return the "best" ancestor context of self and c2"""
1210 1210 return self._parents[0].ancestor(c2) # punt on two parents for now
1211 1211
1212 def walk(self, match):
1213 '''Generates matching file names.'''
1214 return sorted(self._repo.dirstate.walk(self._repo.narrowmatch(match),
1215 subrepos=sorted(self.substate),
1216 unknown=True, ignored=False))
1217
1218 def matches(self, match):
1219 match = self._repo.narrowmatch(match)
1220 ds = self._repo.dirstate
1221 return sorted(f for f in ds.matches(match) if ds[f] != 'r')
1222
1223 1212 def ancestors(self):
1224 1213 for p in self._parents:
1225 1214 yield p
@@ -1656,6 +1645,17 b' class workingctx(committablectx):'
1656 1645 match.bad = bad
1657 1646 return match
1658 1647
1648 def walk(self, match):
1649 '''Generates matching file names.'''
1650 return sorted(self._repo.dirstate.walk(self._repo.narrowmatch(match),
1651 subrepos=sorted(self.substate),
1652 unknown=True, ignored=False))
1653
1654 def matches(self, match):
1655 match = self._repo.narrowmatch(match)
1656 ds = self._repo.dirstate
1657 return sorted(f for f in ds.matches(match) if ds[f] != 'r')
1658
1659 1659 def markcommitted(self, node):
1660 1660 super(workingctx, self).markcommitted(node)
1661 1661
General Comments 0
You need to be logged in to leave comments. Login now