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

login
register
mail settings
Submitter Jordi Gutiérrez Hermoso
Date May 5, 2015, 9:39 p.m.
Message ID <8e4947af3fe576862b49.1430861953@Iris>
Download mbox | patch
Permalink /patch/8916/
State Superseded
Commit 081b08e4ea1350f5c501b0ae0915547b8acc5503
Headers show

Comments

Jordi Gutiérrez Hermoso - May 5, 2015, 9:39 p.m.
# HG changeset patch
# User Jordi Gutiérrez Hermoso <jordigh@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.

Patch

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