diff -r beb667c9880f -r a7f7eff4ec08 mercurial/commands.py --- 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(