equal
deleted
inserted
replaced
1207 |
1207 |
1208 def ancestor(self, c2): |
1208 def ancestor(self, c2): |
1209 """return the "best" ancestor context of self and c2""" |
1209 """return the "best" ancestor context of self and c2""" |
1210 return self._parents[0].ancestor(c2) # punt on two parents for now |
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 def ancestors(self): |
1212 def ancestors(self): |
1224 for p in self._parents: |
1213 for p in self._parents: |
1225 yield p |
1214 yield p |
1226 for a in self._repo.changelog.ancestors( |
1215 for a in self._repo.changelog.ancestors( |
1227 [p.rev() for p in self._parents]): |
1216 [p.rev() for p in self._parents]): |
1654 self._repo.ui.warn('%s: %s\n' % |
1643 self._repo.ui.warn('%s: %s\n' % |
1655 (self._repo.dirstate.pathto(f), msg)) |
1644 (self._repo.dirstate.pathto(f), msg)) |
1656 match.bad = bad |
1645 match.bad = bad |
1657 return match |
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 def markcommitted(self, node): |
1659 def markcommitted(self, node): |
1660 super(workingctx, self).markcommitted(node) |
1660 super(workingctx, self).markcommitted(node) |
1661 |
1661 |
1662 sparse.aftercommit(self._repo, node) |
1662 sparse.aftercommit(self._repo, node) |
1663 |
1663 |