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

login
register
mail settings
Submitter Yuya Nishihara
Date June 16, 2017, 4:37 p.m.
Message ID <5982ed0541c6b63bc392.1497631031@mimosa>
Download mbox | patch
Permalink /patch/21432/
State Accepted
Headers show

Comments

Yuya Nishihara - June 16, 2017, 4:37 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@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.

Patch

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'):