Patchwork [6,of,6] templater: parse the config as a mapfile

login
register
mail settings
Submitter Jordi Gutiérrez Hermoso
Date May 2, 2015, 4:56 a.m.
Message ID <0254f32859ebe9c8e7c4.1430542581@Iris>
Download mbox | patch
Permalink /patch/8852/
State Rejected
Headers show

Comments

Jordi Gutiérrez Hermoso - May 2, 2015, 4:56 a.m.
# HG changeset patch
# User Jordi Gutiérrez Hermoso <jordigh@octave.org>
# Date 1430344533 14400
#      Wed Apr 29 17:55:33 2015 -0400
# Node ID 0254f32859ebe9c8e7c481a16c888e6faf7d1c76
# Parent  c06e371d76b759b900b34120d8d3e90a63790660
templater: parse the config as a mapfile

This will allow %include statements to search the default template
path in addition to the directory where the %including file is.

Patch

diff --git a/mercurial/templater.py b/mercurial/templater.py
--- a/mercurial/templater.py
+++ b/mercurial/templater.py
@@ -702,7 +702,7 @@  class templater(object):
             raise util.Abort(_("style '%s' not found") % mapfile,
                              hint=_("available styles: %s") % stylelist())
 
-        conf = config.config()
+        conf = config.config(mapfile=True)
         conf.read(mapfile)
 
         for key, val in conf[''].items():