[PATCH 6 of 6 V3] templater: look for mapfiles in template paths

Jordi GutiƩrrez Hermoso jordigh at octave.org
Sun May 10 13:44:46 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 cdbe72df6eb1ad01592097f7a502eb9f98f12ca5
# Parent  f23483529388f9dcb66e4eaceb10b2e6a5c0f0fb
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