Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
35683:ea3320015d54 | 35684:1c929b4942a3 |
---|---|
3403 if linerange and pats: | 3403 if linerange and pats: |
3404 raise error.Abort( | 3404 raise error.Abort( |
3405 _('FILE arguments are not compatible with --line-range option') | 3405 _('FILE arguments are not compatible with --line-range option') |
3406 ) | 3406 ) |
3407 | 3407 |
3408 if opts.get('follow_first') and opts.get('rev'): | |
3409 opts['rev'] = [revsetlang.formatspec('reverse(_firstancestors(%lr))', | |
3410 opts.get('rev'))] | |
3411 del opts['follow_first'] | |
3412 elif opts.get('follow') and opts.get('rev'): | |
3413 opts['rev'] = [revsetlang.formatspec('reverse(::%lr)', opts.get('rev'))] | |
3414 del opts['follow'] | |
3415 | |
3416 repo = scmutil.unhidehashlikerevs(repo, opts.get('rev'), 'nowarn') | 3408 repo = scmutil.unhidehashlikerevs(repo, opts.get('rev'), 'nowarn') |
3417 revs, filematcher = cmdutil.getlogrevs(repo, pats, opts) | 3409 revs, filematcher = cmdutil.getlogrevs(repo, pats, opts) |
3418 hunksfilter = None | 3410 hunksfilter = None |
3419 | 3411 |
3420 if opts.get('graph'): | 3412 if opts.get('graph'): |