[PATCH] hgweb: register web.comparisoncontext to the config table

Matt Harbison mharbison72 at gmail.com
Mon Dec 10 05:06:08 UTC 2018


# HG changeset patch
# User Matt Harbison <matt_harbison at yahoo.com>
# Date 1544417330 18000
#      Sun Dec 09 23:48:50 2018 -0500
# Node ID f0cc7ed44c71e330da526839cc7b055a9826a98a
# Parent  443eb4bc41af00cafefcf235f15bad24b1ea56a1
hgweb: register web.comparisoncontext to the config table

This was caught in some server side logging added to debug py3 issues.

diff --git a/mercurial/configitems.py b/mercurial/configitems.py
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -1307,6 +1307,9 @@ coreconfigitem('web', 'archivesubrepos',
 coreconfigitem('web', 'cache',
     default=True,
 )
+coreconfigitem('web', 'comparisoncontext',
+    default=5,
+)
 coreconfigitem('web', 'contact',
     default=None,
 )
diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py
--- a/mercurial/hgweb/webcommands.py
+++ b/mercurial/hgweb/webcommands.py
@@ -858,7 +858,7 @@ def comparison(web):
     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():


More information about the Mercurial-devel mailing list