equal
deleted
inserted
replaced
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( |