changeset 35037:da5d5ea7d696

config: rename allowpull to allow-pull As part of ConfigConsolidationPlan [1], rename the option according to the new UI guidelines [2] and add an alias for backward compatibility. [1]: https://www.mercurial-scm.org/wiki/ConfigConsolidationPlan [2]: https://www.mercurial-scm.org/wiki/UIGuideline#adding_new_options
author David Demelier <markand@malikania.fr>
date Thu, 19 Oct 2017 11:43:19 +0200
parents 75013952d8d9
children 6ef744a7df65
files mercurial/configitems.py mercurial/help/config.txt mercurial/hgweb/hgweb_mod.py
diffstat 3 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/configitems.py	Fri Nov 10 19:14:06 2017 +0800
+++ b/mercurial/configitems.py	Thu Oct 19 11:43:19 2017 +0200
@@ -1006,7 +1006,8 @@
 coreconfigitem('web', 'allowgz',
     default=False,
 )
-coreconfigitem('web', 'allowpull',
+coreconfigitem('web', 'allow-pull',
+    alias=[('web', 'allowpull')],
     default=True,
 )
 coreconfigitem('web', 'allow_push',
--- a/mercurial/help/config.txt	Fri Nov 10 19:14:06 2017 +0800
+++ b/mercurial/help/config.txt	Thu Oct 19 11:43:19 2017 +0200
@@ -2287,7 +2287,7 @@
     revisions.
     (default: False)
 
-``allowpull``
+``allow-pull``
     Whether to allow pulling from the repository. (default: True)
 
 ``allow_push``
--- a/mercurial/hgweb/hgweb_mod.py	Fri Nov 10 19:14:06 2017 +0800
+++ b/mercurial/hgweb/hgweb_mod.py	Thu Oct 19 11:43:19 2017 +0200
@@ -114,7 +114,7 @@
         self.stripecount = self.configint('web', 'stripes')
         self.maxshortchanges = self.configint('web', 'maxshortchanges')
         self.maxfiles = self.configint('web', 'maxfiles')
-        self.allowpull = self.configbool('web', 'allowpull')
+        self.allowpull = self.configbool('web', 'allow-pull')
 
         # we use untrusted=False to prevent a repo owner from using
         # web.templates in .hg/hgrc to get access to any file readable