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

login
register
mail settings
Submitter Jordi Gutiérrez Hermoso
Date May 10, 2015, 6:44 p.m.
Message ID <cdbe72df6eb1ad015920.1431283486@Iris>
Download mbox | patch
Permalink /patch/9010/
State Superseded
Commit 081b08e4ea1350f5c501b0ae0915547b8acc5503
Headers show

Comments

Jordi Gutiérrez Hermoso - May 10, 2015, 6:44 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 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.

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