Mercurial > public > mercurial-scm > hg
comparison mercurial/revset.py @ 23704:c624fb2c4239
linkrev: also adjust linkrev when bootstrapping 'follow' revset
The follow revset (used by `hg log --follow`) now uses the new 'introrev'
method to bootstrap its traversal. This catches issues from linkrev-shadowing of
the changesets introducing the version of a file in source changeset.
A new test has been added to display pathological cases.
Another test is affected because it was meant to test this behavior but actually
failed to do so for half of the output. The output are now similar.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Mon, 29 Dec 2014 23:40:24 -0800 |
parents | c237499a7fba |
children | 34364a4b25eb |
comparison
equal
deleted
inserted
replaced
23703:aaa76612b3c0 | 23704:c624fb2c4239 |
---|---|
805 x = getstring(l[0], _("%s expected a filename") % name) | 805 x = getstring(l[0], _("%s expected a filename") % name) |
806 if x in c: | 806 if x in c: |
807 cx = c[x] | 807 cx = c[x] |
808 s = set(ctx.rev() for ctx in cx.ancestors(followfirst=followfirst)) | 808 s = set(ctx.rev() for ctx in cx.ancestors(followfirst=followfirst)) |
809 # include the revision responsible for the most recent version | 809 # include the revision responsible for the most recent version |
810 s.add(cx.linkrev()) | 810 s.add(cx.introrev()) |
811 else: | 811 else: |
812 return baseset() | 812 return baseset() |
813 else: | 813 else: |
814 s = _revancestors(repo, baseset([c.rev()]), followfirst) | 814 s = _revancestors(repo, baseset([c.rev()]), followfirst) |
815 | 815 |