hgext/histedit.py
changeset 45873 62983988bbf5
parent 45872 ec6ba70be853
child 45908 f4065c3f09b8
--- a/hgext/histedit.py	Mon Nov 16 10:30:06 2020 -0800
+++ b/hgext/histedit.py	Mon Nov 16 10:30:53 2020 -0800
@@ -525,7 +525,11 @@
         """
         ctx = self.repo[self.node]
         ui = self.repo.ui
-        with ui.configoverride({}, b'histedit'):
+        # 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'histedit'
+        ):
             summary = cmdutil.rendertemplate(
                 ctx, ui.config(b'histedit', b'summary-template')
             )