mercurial/commands.py
changeset 35646 a177c6aa055a
parent 35606 4b68ca118d8d
child 35681 e29823c6d3e8
--- 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']