Patchwork [22,of,23] configitems: register the 'web.templates' config

login
register
mail settings
Submitter Boris Feld
Date Sept. 16, 2017, 6:28 p.m.
Message ID <93a8e90493a27207b281.1505586509@FB>
Download mbox | patch
Permalink /patch/23974/
State Accepted
Headers show

Comments

Boris Feld - Sept. 16, 2017, 6:28 p.m.
# HG changeset patch
# User Boris Feld <boris.feld@octobus.net>
# Date 1498787153 -7200
#      ven. juin 30 03:45:53 2017 +0200
# Node ID 93a8e90493a27207b281f1bcf19bdf0ae6d115ca
# Parent  f797154081a8010496a369b3ed7c6eeeae1fdbd1
# EXP-Topic config.register.web
configitems: register the 'web.templates' config

Patch

diff -r f797154081a8 -r 93a8e90493a2 mercurial/configitems.py
--- a/mercurial/configitems.py	ven. juin 30 03:45:52 2017 +0200
+++ b/mercurial/configitems.py	ven. juin 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,
 )
diff -r f797154081a8 -r 93a8e90493a2 mercurial/hgweb/hgwebdir_mod.py
--- a/mercurial/hgweb/hgwebdir_mod.py	ven. juin 30 03:45:52 2017 +0200
+++ b/mercurial/hgweb/hgwebdir_mod.py	ven. juin 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)