[PATCH 5 of 5 V2] templater: look for mapfiles in template paths

Jordi GutiƩrrez Hermoso jordigh at octave.org
Tue May 5 16:39:13 CDT 2015


# HG changeset patch
# User Jordi GutiƩrrez Hermoso <jordigh at octave.org>
# Date 1430860660 14400
#      Tue May 05 17:17:40 2015 -0400
# Node ID 8e4947af3fe576862b498e8bf5c29d4ec9f187ce
# Parent  b7e9b8d77e46052e639fca04b1aee2cfdefbd4f7
templater: look for mapfiles in template paths

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

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


More information about the Mercurial-devel mailing list