# HG changeset patch # User Yuya Nishihara # Date 1513945369 -32400 # Node ID c240657febb7de5e600b67174d5cf7f8dff250a6 # Parent 964510dcdc2a6dd9a8f5d89f7c35cef30396b8de templater: drop unneeded resources from conflict-marker data Follow-up for 32c278eb876f and f1c54d003327. diff -r 964510dcdc2a -r c240657febb7 mercurial/filemerge.py --- a/mercurial/filemerge.py Fri Dec 22 21:12:17 2017 +0900 +++ b/mercurial/filemerge.py Fri Dec 22 21:22:49 2017 +0900 @@ -543,7 +543,7 @@ util.unlink(b) util.unlink(c) -def _formatconflictmarker(repo, ctx, template, label, pad): +def _formatconflictmarker(ctx, template, label, pad): """Applies the given template to the ctx, prefixed by the label. Pad is the minimum width of the label prefix, so that multiple markers @@ -553,9 +553,7 @@ ctx = ctx.p1() props = templatekw.keywords.copy() - props['templ'] = template props['ctx'] = ctx - props['repo'] = repo templateresult = template.render(props) label = ('%s:' % label).ljust(pad + 1) @@ -586,10 +584,10 @@ pad = max(len(l) for l in labels) - newlabels = [_formatconflictmarker(repo, cd, tmpl, labels[0], pad), - _formatconflictmarker(repo, co, tmpl, labels[1], pad)] + newlabels = [_formatconflictmarker(cd, tmpl, labels[0], pad), + _formatconflictmarker(co, tmpl, labels[1], pad)] if len(labels) > 2: - newlabels.append(_formatconflictmarker(repo, ca, tmpl, labels[2], pad)) + newlabels.append(_formatconflictmarker(ca, tmpl, labels[2], pad)) return newlabels def partextras(labels):