# HG changeset patch # User David Demelier # Date 1508406401 -7200 # Node ID 6ef744a7df653defd0e83f56155b994b7a8a7ff4 # Parent da5d5ea7d696de37893b93232d0a76a53e8208b1 config: rename allow_push to allow-push 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 diff -r da5d5ea7d696 -r 6ef744a7df65 mercurial/commands.py --- a/mercurial/commands.py Thu Oct 19 11:43:19 2017 +0200 +++ b/mercurial/commands.py Thu Oct 19 11:46:41 2017 +0200 @@ -4695,7 +4695,7 @@ Please note that the server does not implement access control. This means that, by default, anybody can read from the server and - nobody can write to it by default. Set the ``web.allow_push`` + nobody can write to it by default. Set the ``web.allow-push`` option to ``*`` to allow everybody to push to the server. You should use a real web server if you need to authenticate users. diff -r da5d5ea7d696 -r 6ef744a7df65 mercurial/configitems.py --- a/mercurial/configitems.py Thu Oct 19 11:43:19 2017 +0200 +++ b/mercurial/configitems.py Thu Oct 19 11:46:41 2017 +0200 @@ -1010,7 +1010,8 @@ alias=[('web', 'allowpull')], default=True, ) -coreconfigitem('web', 'allow_push', +coreconfigitem('web', 'allow-push', + alias=[('web', 'allow_push')], default=list, ) coreconfigitem('web', 'allowzip', diff -r da5d5ea7d696 -r 6ef744a7df65 mercurial/help/config.txt --- a/mercurial/help/config.txt Thu Oct 19 11:43:19 2017 +0200 +++ b/mercurial/help/config.txt Thu Oct 19 11:46:41 2017 +0200 @@ -2260,7 +2260,7 @@ you want it to accept pushes from anybody, you can use the following command line:: - $ hg --config web.allow_push=* --config web.push_ssl=False serve + $ hg --config web.allow-push=* --config web.push_ssl=False serve Note that this will allow anybody to push anything to the server and that this should not be used for public servers. @@ -2290,13 +2290,13 @@ ``allow-pull`` Whether to allow pulling from the repository. (default: True) -``allow_push`` +``allow-push`` Whether to allow pushing to the repository. If empty or not set, pushing is not allowed. If the special value ``*``, any remote user can push, including unauthenticated users. Otherwise, the remote user must have been authenticated, and the authenticated user name must be present in this list. The contents of the - allow_push list are examined after the deny_push list. + allow-push list are examined after the deny_push list. ``allow_read`` If the user has not already been denied repository access due to @@ -2390,7 +2390,7 @@ push is not denied. If the special value ``*``, all remote users are denied push. Otherwise, unauthenticated users are all denied, and any authenticated user name present in this list is also denied. The - contents of the deny_push list are examined before the allow_push list. + contents of the deny_push list are examined before the allow-push list. ``deny_read`` Whether to deny reading/viewing of the repository. If this list is diff -r da5d5ea7d696 -r 6ef744a7df65 mercurial/hgweb/common.py --- a/mercurial/hgweb/common.py Thu Oct 19 11:43:19 2017 +0200 +++ b/mercurial/hgweb/common.py Thu Oct 19 11:46:41 2017 +0200 @@ -75,7 +75,7 @@ if deny and (not user or ismember(hgweb.repo.ui, user, deny)): raise ErrorResponse(HTTP_UNAUTHORIZED, 'push not authorized') - allow = hgweb.configlist('web', 'allow_push') + allow = hgweb.configlist('web', 'allow-push') if not (allow and ismember(hgweb.repo.ui, user, allow)): raise ErrorResponse(HTTP_UNAUTHORIZED, 'push not authorized')