diff mercurial/commands.py @ 35684:1c929b4942a3

log: resolve --follow with -rREV in cmdutil.getlogrevs() This also fixes alias expansion. Before, reverse() could be overridden by user alias. This isn't processed at _logrevs() as we'll need starting revisions to parse file patterns. See the subsequent patches for details.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 10 Dec 2017 17:28:44 +0900
parents ea3320015d54
children 41ef02ba329b
line wrap: on
line diff
--- a/mercurial/commands.py	Sun Dec 10 18:22:06 2017 +0900
+++ b/mercurial/commands.py	Sun Dec 10 17:28:44 2017 +0900
@@ -3405,14 +3405,6 @@
             _('FILE arguments are not compatible with --line-range option')
         )
 
-    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']
-
     repo = scmutil.unhidehashlikerevs(repo, opts.get('rev'), 'nowarn')
     revs, filematcher = cmdutil.getlogrevs(repo, pats, opts)
     hunksfilter = None