comparison hgext/show.py @ 32855:50586a0a946f

cmdutil: factor out helper to create changeset_templater with literal template changeset_templater has lots of arguments, but most callers only need to specify a literal template 'tmpl'. "hg debugtemplate" has no diff option, which means 'opts' were effectively {}, so dropped opts.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 22 Apr 2017 18:42:03 +0900
parents 04baab18d60a
children 11f768258dcc
comparison
equal deleted inserted replaced
32854:29558247b00e 32855:50586a0a946f
194 """changesets that aren't finished""" 194 """changesets that aren't finished"""
195 # TODO support date-based limiting when calling revset. 195 # TODO support date-based limiting when calling revset.
196 revs = repo.revs('sort(_underway(), topo)') 196 revs = repo.revs('sort(_underway(), topo)')
197 197
198 revdag = graphmod.dagwalker(repo, revs) 198 revdag = graphmod.dagwalker(repo, revs)
199 displayer = cmdutil.changeset_templater(ui, repo, None, None, 199 tmpl = fm._t.load(fm._topic)
200 tmpl=fm._t.load(fm._topic), 200 displayer = cmdutil.makelogtemplater(ui, repo, tmpl, buffered=True)
201 mapfile=None, buffered=True)
202 201
203 ui.setconfig('experimental', 'graphshorten', True) 202 ui.setconfig('experimental', 'graphshorten', True)
204 cmdutil.displaygraph(ui, repo, revdag, displayer, graphmod.asciiedges) 203 cmdutil.displaygraph(ui, repo, revdag, displayer, graphmod.asciiedges)
205 204
206 # Adjust the docstring of the show command so it shows all registered views. 205 # Adjust the docstring of the show command so it shows all registered views.