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 a1aca354 authored by Martin von Zweigbergk's avatar Martin von Zweigbergk

tests: show how `hg histedit` can put color codes in histedit plan

Differential Revision: https://phab.mercurial-scm.org/D9323
parent 8357e0e81bb7
......@@ -525,9 +525,10 @@ class histeditaction(object):
"""
ctx = self.repo[self.node]
ui = self.repo.ui
summary = cmdutil.rendertemplate(
ctx, ui.config(b'histedit', b'summary-template')
)
with ui.configoverride({}, b'histedit'):
summary = cmdutil.rendertemplate(
ctx, ui.config(b'histedit', b'summary-template')
)
summary = summary.splitlines()[0]
line = b'%s %s %s' % (self.verb, ctx, summary)
# trim to 75 columns by default so it's not stupidly wide in my editor
......
......@@ -104,6 +104,32 @@ test customization of revision summary
#
colors in the custom template don't show up in the editor
$ HGEDITOR=cat hg histedit 177f92b77385 --color=debug \
> --config histedit.summary-template='I am rev {label("rev", rev)}'
pick 177f92b77385 I am rev [rev|2]
pick 055a42cdd887 I am rev [rev|3]
pick e860deea161a I am rev [rev|4]
pick 652413bf663e I am rev [rev|5]
# Edit history between 177f92b77385 and 652413bf663e
#
# Commits are listed from least to most recent
#
# You can reorder changesets by reordering the lines
#
# Commands:
#
# e, edit = use commit, but stop for amending
# m, mess = edit commit message without changing commit content
# p, pick = use commit
# b, base = checkout changeset and apply further changesets from there
# d, drop = remove commit from history
# f, fold = use commit, but combine it with the one above
# r, roll = like fold, but discard this commit's description and date
#
edit the history
(use a hacky editor to check histedit-last-edit.txt backup)
......
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