# HG changeset patch # User Matt Mackall # Date 2010-11-15 23:00:43 # Node ID acd69df118ab1e81cb5e3fa90cd2b33f2f7aabe4 # Parent 827aa0992ceac9aed184dddd915bf3ade527794f context: walk both parents for workingctx.ancestors() diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -818,6 +818,11 @@ class workingctx(changectx): 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 remove(self, list, unlink=False): if unlink: for f in list: