Mercurial > hg
diff 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 |
line wrap: on
line diff
--- a/mercurial/commands.py Sat Dec 30 17:55:23 2017 +0900 +++ b/mercurial/commands.py Thu Jan 04 10:51:41 2018 +0900 @@ -3409,14 +3409,14 @@ opts['rev'] = [revsetlang.formatspec('reverse(::%lr)', opts.get('rev'))] del opts['follow'] + repo = scmutil.unhidehashlikerevs(repo, opts.get('rev'), 'nowarn') + revs, expr, filematcher = cmdutil.getlogrevs(repo, pats, opts) + hunksfilter = None + if opts.get('graph'): if linerange: raise error.Abort(_('graph not supported with line range patterns')) - return cmdutil.graphlog(ui, repo, pats, opts) - - repo = scmutil.unhidehashlikerevs(repo, opts.get('rev'), 'nowarn') - revs, expr, filematcher = cmdutil.getlogrevs(repo, pats, opts) - hunksfilter = None + return cmdutil.graphlog(ui, repo, revs, filematcher, opts) if linerange: revs, lrfilematcher, hunksfilter = cmdutil.getloglinerangerevs(