hgweb: register web.comparisoncontext to the config table stable
authorMatt Harbison <matt_harbison@yahoo.com>
Sun, 09 Dec 2018 23:48:50 -0500
branchstable
changeset 40820 4265bfb53dd3
parent 40818 47719d7c581f
child 40926 21f5810df848
hgweb: register web.comparisoncontext to the config table This was caught in some server side logging added to debug py3 issues.
mercurial/configitems.py
mercurial/hgweb/webcommands.py
--- a/mercurial/configitems.py	Tue Dec 04 17:04:19 2018 -0500
+++ b/mercurial/configitems.py	Sun Dec 09 23:48:50 2018 -0500
@@ -1274,6 +1274,9 @@
 coreconfigitem('web', 'cache',
     default=True,
 )
+coreconfigitem('web', 'comparisoncontext',
+    default=5,
+)
 coreconfigitem('web', 'contact',
     default=None,
 )
--- a/mercurial/hgweb/webcommands.py	Tue Dec 04 17:04:19 2018 -0500
+++ b/mercurial/hgweb/webcommands.py	Sun Dec 09 23:48:50 2018 -0500
@@ -858,7 +858,7 @@
     if 'context' in web.req.qsparams:
         context = parsecontext(web.req.qsparams['context'])
     else:
-        context = parsecontext(web.config('web', 'comparisoncontext', '5'))
+        context = parsecontext(web.config('web', 'comparisoncontext'))
 
     def filelines(f):
         if f.isbinary():