diff -r b6b7855c79aa -r a177c6aa055a mercurial/commands.py --- a/mercurial/commands.py Tue Jan 02 17:37:01 2018 +0900 +++ b/mercurial/commands.py Sun Dec 10 18:25:33 2017 +0900 @@ -3405,7 +3405,11 @@ _('FILE arguments are not compatible with --line-range option') ) - if opts.get('follow') and opts.get('rev'): + if opts.get('follow_first') and opts.get('rev'): + opts['rev'] = [revsetlang.formatspec('reverse(_firstancestors(%lr))', + opts.get('rev'))] + del opts['follow_first'] + elif opts.get('follow') and opts.get('rev'): opts['rev'] = [revsetlang.formatspec('reverse(::%lr)', opts.get('rev'))] del opts['follow']