diff -r 96b2dd3b184d -r 2963fba2d18a mercurial/cmdutil.py --- a/mercurial/cmdutil.py Sat Sep 24 19:52:02 2016 +0900 +++ b/mercurial/cmdutil.py Sat Sep 24 19:58:23 2016 +0900 @@ -1941,7 +1941,7 @@ # --follow, we want the names of the ancestors of FILE in the # revision, stored in "fcache". "fcache" is populated by # reproducing the graph traversal already done by --follow revset - # and relating linkrevs to file names (which is not "correct" but + # and relating revs to file names (which is not "correct" but # good enough). fcache = {} fcacheready = [False] @@ -1950,9 +1950,9 @@ def populate(): for fn in files: fctx = pctx[fn] - fcache.setdefault(fctx.linkrev(), set()).add(fctx.path()) + fcache.setdefault(fctx.introrev(), set()).add(fctx.path()) for c in fctx.ancestors(followfirst=followfirst): - fcache.setdefault(c.linkrev(), set()).add(c.path()) + fcache.setdefault(c.rev(), set()).add(c.path()) def filematcher(rev): if not fcacheready[0]: