This instance will be upgraded to Heptapod 0.21.0rc3 on 2021-04-23 at 10:30 UTC+2 (a few minutes of down time)

Commit d02fb62e authored by Martin von Zweigbergk's avatar Martin von Zweigbergk

split: disable color while rendering template for use in commit message

Differential Revision: https://phab.mercurial-scm.org/D9322
parent c10683da6889
......@@ -142,9 +142,14 @@ def dosplit(ui, repo, tr, ctx, opts):
header = _(
b'HG: Splitting %s. So far it has been split into:\n'
) % short(ctx.node())
for c in committed:
summary = cmdutil.format_changeset_summary(ui, c, b'split')
header += _(b'HG: - %s\n') % summary
# We don't want color codes in the commit message template, so
# disable the label() template function while we render it.
with ui.configoverride(
{(b'templatealias', b'label(l,x)'): b"x"}, b'split'
):
for c in committed:
summary = cmdutil.format_changeset_summary(ui, c, b'split')
header += _(b'HG: - %s\n') % summary
header += _(
b'HG: Write commit message for the next split changeset.\n'
)
......
......@@ -1031,7 +1031,7 @@ Test that color codes don't end up in the commit message template
(enter ? for help) [Ynesfdaq?]] [ ui.promptecho|a]
EDITOR: HG: Splitting 6432c65c3078. So far it has been split into:
EDITOR: HG: - [rev|2] split2, modifying file2
EDITOR: HG: - 2 split2, modifying file2
EDITOR: HG: Write commit message for the next split changeset.
EDITOR: split1, modifying file1
EDITOR:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment