comparison mercurial/templater.py @ 25096:081b08e4ea13

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.
author Jordi Guti?rrez Hermoso <jordigh@octave.org>
date Fri, 15 May 2015 09:07:27 -0400
parents 5e584edbb211
children ef8956aa8755
comparison
equal deleted inserted replaced
25095:3182965b3971 25096:081b08e4ea13
741 return 741 return
742 if not os.path.exists(mapfile): 742 if not os.path.exists(mapfile):
743 raise util.Abort(_("style '%s' not found") % mapfile, 743 raise util.Abort(_("style '%s' not found") % mapfile,
744 hint=_("available styles: %s") % stylelist()) 744 hint=_("available styles: %s") % stylelist())
745 745
746 conf = config.config() 746 conf = config.config(includepaths=templatepaths())
747 conf.read(mapfile) 747 conf.read(mapfile)
748 748
749 for key, val in conf[''].items(): 749 for key, val in conf[''].items():
750 if not val: 750 if not val:
751 raise SyntaxError(_('%s: missing value') % conf.source('', key)) 751 raise SyntaxError(_('%s: missing value') % conf.source('', key))