[PATCH 5 of 6] commit: do not look up committemplate in template paths (BC)

Yuya Nishihara yuya at tcha.org
Fri Jun 16 12:37:11 EDT 2017


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1492842509 -32400
#      Sat Apr 22 15:28:29 2017 +0900
# Node ID 5982ed0541c6b63bc3928ff3f5ce7c55b401a520
# Parent  0ceb0e2fca59fc3655671eef60ed3829b2d768a3
commit: do not look up committemplate in template paths (BC)

>From 5375ba75df40 and de5cee8ba088, I don't think the current behavior is
intended. Commit templates should be processed as literal templates.

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -2959,7 +2959,7 @@ def commitforceeditor(repo, ctx, subs, f
 
 def buildcommittemplate(repo, ctx, subs, extramsg, tmpl):
     ui = repo.ui
-    spec = _lookuplogtemplate(ui, tmpl, None)
+    spec = logtemplatespec(tmpl, None)
     t = changeset_templater(ui, repo, spec, None, {}, False)
 
     for k, v in repo.ui.configitems('committemplate'):


More information about the Mercurial-devel mailing list