Patchwork [21,of,23] configitems: register the 'web.style' config

login
register
mail settings
Submitter Boris Feld
Date Sept. 16, 2017, 6:28 p.m.
Message ID <f797154081a8010496a3.1505586508@FB>
Download mbox | patch
Permalink /patch/23973/
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 1498787152 -7200
#      ven. juin 30 03:45:52 2017 +0200
# Node ID f797154081a8010496a369b3ed7c6eeeae1fdbd1
# Parent  e9ddab0ad36f9740f14c142d30fb58ba10204f29
# EXP-Topic config.register.web
configitems: register the 'web.style' config

Patch

diff -r e9ddab0ad36f -r f797154081a8 mercurial/configitems.py
--- a/mercurial/configitems.py	ven. juin 30 03:45:51 2017 +0200
+++ b/mercurial/configitems.py	ven. juin 30 03:45:52 2017 +0200
@@ -640,6 +640,9 @@ 
 coreconfigitem('web', 'stripes',
     default=1,
 )
+coreconfigitem('web', 'style',
+    default='paper',
+)
 coreconfigitem('worker', 'backgroundclose',
     default=dynamicdefault,
 )
diff -r e9ddab0ad36f -r f797154081a8 mercurial/hgweb/hgwebdir_mod.py
--- a/mercurial/hgweb/hgwebdir_mod.py	ven. juin 30 03:45:51 2017 +0200
+++ b/mercurial/hgweb/hgwebdir_mod.py	ven. juin 30 03:45:52 2017 +0200
@@ -173,7 +173,7 @@ 
         self.repos = repos
         self.ui = u
         encoding.encoding = self.ui.config('web', 'encoding')
-        self.style = self.ui.config('web', 'style', 'paper')
+        self.style = self.ui.config('web', 'style')
         self.templatepath = self.ui.config('web', 'templates', None)
         self.stripecount = self.ui.config('web', 'stripes')
         if self.stripecount:
diff -r e9ddab0ad36f -r f797154081a8 mercurial/hgweb/webcommands.py
--- a/mercurial/hgweb/webcommands.py	ven. juin 30 03:45:51 2017 +0200
+++ b/mercurial/hgweb/webcommands.py	ven. juin 30 03:45:52 2017 +0200
@@ -762,7 +762,7 @@ 
         ctx = fctx.changectx()
     basectx = ctx.p1()
 
-    style = web.config('web', 'style', 'paper')
+    style = web.config('web', 'style')
     if 'style' in req.form:
         style = req.form['style'][0]
 
@@ -999,7 +999,7 @@ 
     revs = fctx.filelog().revs(start, end - 1)
     entries = []
 
-    diffstyle = web.config('web', 'style', 'paper')
+    diffstyle = web.config('web', 'style')
     if 'style' in req.form:
         diffstyle = req.form['style'][0]
 
diff -r e9ddab0ad36f -r f797154081a8 mercurial/hgweb/webutil.py
--- a/mercurial/hgweb/webutil.py	ven. juin 30 03:45:51 2017 +0200
+++ b/mercurial/hgweb/webutil.py	ven. juin 30 03:45:52 2017 +0200
@@ -406,7 +406,7 @@ 
     if basectx is None:
         basectx = ctx.p1()
 
-    style = web.config('web', 'style', 'paper')
+    style = web.config('web', 'style')
     if 'style' in req.form:
         style = req.form['style'][0]