Mercurial > public > mercurial-scm > hg
diff mercurial/commands.py @ 35646:a177c6aa055a
log: rewrite --follow-first -rREV like --follow for consistency (BC)
This helps fixing the "--follow -rREV PATH" issue.
.. bc::
``log --follow-first -rREV``, which is deprecated, now follows the first
parent of merge revisions from the specified ``REV`` just like
``log --follow -rREV``.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 10 Dec 2017 18:25:33 +0900 |
parents | 4b68ca118d8d |
children | e29823c6d3e8 |
line wrap: on
line diff
--- 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']