changeset 40464:4265bfb53dd3 stable

hgweb: register web.comparisoncontext to the config table This was caught in some server side logging added to debug py3 issues.
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 09 Dec 2018 23:48:50 -0500
parents 47719d7c581f
children 21f5810df848
files mercurial/configitems.py mercurial/hgweb/webcommands.py
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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():