Mercurial > hg
changeset 3404:1a437b0f4902
Fix annotate where linkrev != rev without exporting linkrev
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Sun, 15 Oct 2006 18:43:46 -0700 |
parents | 372999405787 |
children | 2e1d8b238b6c |
files | mercurial/context.py |
diffstat | 1 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/context.py Sun Oct 15 18:25:07 2006 -0700 +++ b/mercurial/context.py Sun Oct 15 18:43:46 2006 -0700 @@ -254,10 +254,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):