Mercurial > hg
diff mercurial/logcmdutil.py @ 36196:1abf089a1d70
graphlog: deduplicate preprocessing of log command
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 21 Jan 2018 16:03:14 +0900 |
parents | c1104fe76e69 |
children | 7bc10d3f68b4 |
line wrap: on
line diff
--- a/mercurial/logcmdutil.py Wed Feb 14 20:32:32 2018 +0800 +++ b/mercurial/logcmdutil.py Sun Jan 21 16:03:14 2018 +0900 @@ -899,19 +899,8 @@ lines = [] displayer.close() -def graphlog(ui, repo, revs, differ, opts): - # Parameters are identical to log command ones +def graphlog(ui, repo, revs, displayer, getrenamed): revdag = graphmod.dagwalker(repo, revs) - - getrenamed = None - if opts.get('copies'): - endrev = None - if opts.get('rev'): - endrev = scmutil.revrange(repo, opts.get('rev')).max() + 1 - getrenamed = templatekw.getrenamedfn(repo, endrev=endrev) - - ui.pager('log') - displayer = changesetdisplayer(ui, repo, opts, differ, buffered=True) displaygraph(ui, repo, revdag, displayer, graphmod.asciiedges, getrenamed) def checkunsupportedgraphflags(pats, opts):