Mercurial > public > mercurial-scm > hg
diff mercurial/logcmdutil.py @ 44345:14d0e89520a2
graphlog: use '%' for other context in merge conflict
This lets the user more easily find the commit that is involved in the
conflict, such as the source of `hg update -m` or the commit being
grafted by `hg graft`.
Differential Revision: https://phab.mercurial-scm.org/D8043
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 28 Jan 2020 21:49:50 -0800 |
parents | 6331a6fc3304 |
children | 3b7aabd02e11 |
line wrap: on
line diff
--- a/mercurial/logcmdutil.py Wed Jan 29 14:42:54 2020 -0800 +++ b/mercurial/logcmdutil.py Tue Jan 28 21:49:50 2020 -0800 @@ -1004,7 +1004,7 @@ ui, spec, defaults=templatekw.keywords, resources=tres ) - def formatnode(repo, ctx): + def formatnode(repo, ctx, cache): props = {b'ctx': ctx, b'repo': repo} return templ.renderdefault(props) @@ -1038,8 +1038,9 @@ # experimental config: experimental.graphshorten state.graphshorten = ui.configbool(b'experimental', b'graphshorten') + formatnode_cache = {} for rev, type, ctx, parents in dag: - char = formatnode(repo, ctx) + char = formatnode(repo, ctx, formatnode_cache) copies = getcopies(ctx) if getcopies else None edges = edgefn(type, char, state, rev, parents) firstedge = next(edges)