Mercurial > public > mercurial-scm > hg-stable
diff mercurial/context.py @ 3421:357b5589dc62
Merge with crew
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 17 Oct 2006 18:54:37 -0500 |
parents | cc9c31b07c2c 1a437b0f4902 |
children | 23ede9e7ad4d |
line wrap: on
line diff
--- a/mercurial/context.py Tue Oct 17 18:48:41 2006 -0500 +++ b/mercurial/context.py Tue Oct 17 18:54:37 2006 -0500 @@ -256,10 +256,16 @@ return [ getctx(p, n) for p, n in pl if n != -1 ] + # use linkrev to find the first changeset where self appeared + if self.rev() != self._filelog.linkrev(self._filenode): + base = self.filectx(self.filerev()) + else: + base = self + # find all ancestors - needed = {self: 1} - visit = [self] - files = [self._path] + needed = {base: 1} + visit = [base] + files = [base._path] while visit: f = visit.pop(0) for p in parents(f):