Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
44344:ab632e27f296 | 44345:14d0e89520a2 |
---|---|
1002 tres = formatter.templateresources(ui) | 1002 tres = formatter.templateresources(ui) |
1003 templ = formatter.maketemplater( | 1003 templ = formatter.maketemplater( |
1004 ui, spec, defaults=templatekw.keywords, resources=tres | 1004 ui, spec, defaults=templatekw.keywords, resources=tres |
1005 ) | 1005 ) |
1006 | 1006 |
1007 def formatnode(repo, ctx): | 1007 def formatnode(repo, ctx, cache): |
1008 props = {b'ctx': ctx, b'repo': repo} | 1008 props = {b'ctx': ctx, b'repo': repo} |
1009 return templ.renderdefault(props) | 1009 return templ.renderdefault(props) |
1010 | 1010 |
1011 return formatnode | 1011 return formatnode |
1012 | 1012 |
1036 styles[key] = None | 1036 styles[key] = None |
1037 | 1037 |
1038 # experimental config: experimental.graphshorten | 1038 # experimental config: experimental.graphshorten |
1039 state.graphshorten = ui.configbool(b'experimental', b'graphshorten') | 1039 state.graphshorten = ui.configbool(b'experimental', b'graphshorten') |
1040 | 1040 |
1041 formatnode_cache = {} | |
1041 for rev, type, ctx, parents in dag: | 1042 for rev, type, ctx, parents in dag: |
1042 char = formatnode(repo, ctx) | 1043 char = formatnode(repo, ctx, formatnode_cache) |
1043 copies = getcopies(ctx) if getcopies else None | 1044 copies = getcopies(ctx) if getcopies else None |
1044 edges = edgefn(type, char, state, rev, parents) | 1045 edges = edgefn(type, char, state, rev, parents) |
1045 firstedge = next(edges) | 1046 firstedge = next(edges) |
1046 width = firstedge[2] | 1047 width = firstedge[2] |
1047 displayer.show( | 1048 displayer.show( |