changeset 34247:95f80c095804

configitems: register the 'web.templates' config
author Boris Feld <boris.feld@octobus.net>
date Fri, 30 Jun 2017 03:45:53 +0200
parents db63872e10cc
children b59620c52eec
files mercurial/configitems.py mercurial/hgweb/hgwebdir_mod.py
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/configitems.py	Fri Jun 30 03:45:52 2017 +0200
+++ b/mercurial/configitems.py	Fri Jun 30 03:45:53 2017 +0200
@@ -643,6 +643,9 @@
 coreconfigitem('web', 'style',
     default='paper',
 )
+coreconfigitem('web', 'templates',
+    default=None,
+)
 coreconfigitem('worker', 'backgroundclose',
     default=dynamicdefault,
 )
--- a/mercurial/hgweb/hgwebdir_mod.py	Fri Jun 30 03:45:52 2017 +0200
+++ b/mercurial/hgweb/hgwebdir_mod.py	Fri Jun 30 03:45:53 2017 +0200
@@ -174,7 +174,7 @@
         self.ui = u
         encoding.encoding = self.ui.config('web', 'encoding')
         self.style = self.ui.config('web', 'style')
-        self.templatepath = self.ui.config('web', 'templates', None)
+        self.templatepath = self.ui.config('web', 'templates')
         self.stripecount = self.ui.config('web', 'stripes')
         if self.stripecount:
             self.stripecount = int(self.stripecount)