configitems: register the 'web.view' config
authorBoris Feld <boris.feld@octobus.net>
Wed, 11 Oct 2017 03:18:04 +0200
changeset 34584 bf2389b1f15e
parent 34583 19b2c062654c
child 34585 f28c85e29afc
configitems: register the 'web.view' config
mercurial/configitems.py
mercurial/hgweb/hgweb_mod.py
--- a/mercurial/configitems.py	Wed Oct 11 15:25:57 2017 +0200
+++ b/mercurial/configitems.py	Wed Oct 11 03:18:04 2017 +0200
@@ -748,6 +748,9 @@
 coreconfigitem('web', 'templates',
     default=None,
 )
+coreconfigitem('web', 'view',
+    default='served',
+)
 coreconfigitem('worker', 'backgroundclose',
     default=dynamicdefault,
 )
--- a/mercurial/hgweb/hgweb_mod.py	Wed Oct 11 15:25:57 2017 +0200
+++ b/mercurial/hgweb/hgweb_mod.py	Wed Oct 11 03:18:04 2017 +0200
@@ -482,8 +482,8 @@
 
     The option has been around undocumented since Mercurial 2.5, but no
     user ever asked about it. So we better keep it undocumented for now."""
-    viewconfig = repo.ui.config('web', 'view', 'served',
-                                untrusted=True)
+    # experimental config: web.view
+    viewconfig = repo.ui.config('web', 'view', untrusted=True)
     if viewconfig == 'all':
         return repo.unfiltered()
     elif viewconfig in repoview.filtertable: