changeset 34245:945c9816ec1d

configitems: register the 'web.stripes' config
author Boris Feld <boris.feld@octobus.net>
date Fri, 30 Jun 2017 03:45:51 +0200
parents fe5202bef5ce
children db63872e10cc
files mercurial/configitems.py mercurial/hgweb/hgweb_mod.py mercurial/hgweb/hgwebdir_mod.py
diffstat 3 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/configitems.py	Fri Jun 30 03:45:50 2017 +0200
+++ b/mercurial/configitems.py	Fri Jun 30 03:45:51 2017 +0200
@@ -637,6 +637,9 @@
 coreconfigitem('web', 'refreshinterval',
     default=20,
 )
+coreconfigitem('web', 'stripes',
+    default=1,
+)
 coreconfigitem('worker', 'backgroundclose',
     default=dynamicdefault,
 )
--- a/mercurial/hgweb/hgweb_mod.py	Fri Jun 30 03:45:50 2017 +0200
+++ b/mercurial/hgweb/hgweb_mod.py	Fri Jun 30 03:45:51 2017 +0200
@@ -99,7 +99,7 @@
         self.archivespecs = archivespecs
 
         self.maxchanges = self.configint('web', 'maxchanges', 10)
-        self.stripecount = self.configint('web', 'stripes', 1)
+        self.stripecount = self.configint('web', 'stripes')
         self.maxshortchanges = self.configint('web', 'maxshortchanges', 60)
         self.maxfiles = self.configint('web', 'maxfiles', 10)
         self.allowpull = self.configbool('web', 'allowpull', True)
--- a/mercurial/hgweb/hgwebdir_mod.py	Fri Jun 30 03:45:50 2017 +0200
+++ b/mercurial/hgweb/hgwebdir_mod.py	Fri Jun 30 03:45:51 2017 +0200
@@ -175,7 +175,7 @@
         encoding.encoding = self.ui.config('web', 'encoding')
         self.style = self.ui.config('web', 'style', 'paper')
         self.templatepath = self.ui.config('web', 'templates', None)
-        self.stripecount = self.ui.config('web', 'stripes', 1)
+        self.stripecount = self.ui.config('web', 'stripes')
         if self.stripecount:
             self.stripecount = int(self.stripecount)
         self._baseurl = self.ui.config('web', 'baseurl')