Comments
Patch
@@ -1036,10 +1036,15 @@
def walk(self, match):
return sorted(self._repo.dirstate.walk(match, sorted(self.substate),
True, False))
+ def ancestors(self):
+ for a in self._repo.changelog.ancestors(
+ [p.rev() for p in self._parents]):
+ yield changectx(self._repo, a)
+
class workingctx(commitablectx):
"""A workingctx object makes access to data related to
the current working directory convenient.
date - any valid date string or (unixtime, offset), or None.
user - username string, or None.
@@ -1131,15 +1136,10 @@
self._repo.dirstate.drop(f)
return rejected
finally:
wlock.release()
- def ancestors(self):
- for a in self._repo.changelog.ancestors(
- [p.rev() for p in self._parents]):
- yield changectx(self._repo, a)
-
def undelete(self, list):
pctxs = self.parents()
wlock = self._repo.wlock()
try:
for f in list: