Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/context.py @ 12999:acd69df118ab stable
context: walk both parents for workingctx.ancestors()
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 15 Nov 2010 17:00:43 -0600 |
parents | 95514b58709d |
children | cc4e13c92dfa |
comparison
equal
deleted
inserted
replaced
12989:827aa0992cea | 12999:acd69df118ab |
---|---|
816 else: | 816 else: |
817 self._repo.dirstate.forget(f) | 817 self._repo.dirstate.forget(f) |
818 finally: | 818 finally: |
819 wlock.release() | 819 wlock.release() |
820 | 820 |
821 def ancestors(self): | |
822 for a in self._repo.changelog.ancestors( | |
823 *[p.rev() for p in self._parents]): | |
824 yield changectx(self._repo, a) | |
825 | |
821 def remove(self, list, unlink=False): | 826 def remove(self, list, unlink=False): |
822 if unlink: | 827 if unlink: |
823 for f in list: | 828 for f in list: |
824 try: | 829 try: |
825 util.unlink(self._repo.wjoin(f)) | 830 util.unlink(self._repo.wjoin(f)) |