comparison mercurial/commands.py @ 35543:a7f7eff4ec08

log: merge getlogrevs() and getgraphlogrevs() cmdutil.graphlog() is updated to receive (revs, filematcher) as arguments to make sure that opts['graph'] is set when getlogrevs() is invoked.
author Yuya Nishihara <yuya@tcha.org>
date Thu, 04 Jan 2018 10:51:41 +0900
parents ffd7b7cd309b
children 349bcd7fa670
comparison
equal deleted inserted replaced
35542:beb667c9880f 35543:a7f7eff4ec08
3407 3407
3408 if opts.get('follow') and opts.get('rev'): 3408 if opts.get('follow') and opts.get('rev'):
3409 opts['rev'] = [revsetlang.formatspec('reverse(::%lr)', opts.get('rev'))] 3409 opts['rev'] = [revsetlang.formatspec('reverse(::%lr)', opts.get('rev'))]
3410 del opts['follow'] 3410 del opts['follow']
3411 3411
3412 repo = scmutil.unhidehashlikerevs(repo, opts.get('rev'), 'nowarn')
3413 revs, expr, filematcher = cmdutil.getlogrevs(repo, pats, opts)
3414 hunksfilter = None
3415
3412 if opts.get('graph'): 3416 if opts.get('graph'):
3413 if linerange: 3417 if linerange:
3414 raise error.Abort(_('graph not supported with line range patterns')) 3418 raise error.Abort(_('graph not supported with line range patterns'))
3415 return cmdutil.graphlog(ui, repo, pats, opts) 3419 return cmdutil.graphlog(ui, repo, revs, filematcher, opts)
3416
3417 repo = scmutil.unhidehashlikerevs(repo, opts.get('rev'), 'nowarn')
3418 revs, expr, filematcher = cmdutil.getlogrevs(repo, pats, opts)
3419 hunksfilter = None
3420 3420
3421 if linerange: 3421 if linerange:
3422 revs, lrfilematcher, hunksfilter = cmdutil.getloglinerangerevs( 3422 revs, lrfilematcher, hunksfilter = cmdutil.getloglinerangerevs(
3423 repo, revs, opts) 3423 repo, revs, opts)
3424 3424