diff --git a/hgext/graphlog.py b/hgext/graphlog.py --- a/hgext/graphlog.py +++ b/hgext/graphlog.py @@ -353,7 +353,9 @@ def _makelogrevset(repo, pats, opts, rev fnopats = (('_ancestors', '_fancestors'), ('_descendants', '_fdescendants')) if pats: - opts[fpats[followfirst]] = list(pats) + # follow() revset inteprets its file argument as a + # manifest entry, so use match.files(), not pats. + opts[fpats[followfirst]] = list(match.files()) else: opts[fnopats[followdescendants][followfirst]] = str(startrev) else: diff --git a/tests/test-glog.t b/tests/test-glog.t --- a/tests/test-glog.t +++ b/tests/test-glog.t @@ -2026,6 +2026,20 @@ Test subdir ('string', 'r:') ('string', 'd:relpath')) ('string', 'p:.')))) + $ testlog ../b + [] + (group + (group + (func + ('symbol', 'filelog') + ('string', '../b')))) + $ testlog -f ../b + [] + (group + (group + (func + ('symbol', 'follow') + ('string', 'b')))) $ cd .. Test --hidden