config: rename allow_archive to allow-archive
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
--- a/i18n/da.po Sat Apr 21 17:31:03 2018 +0900
+++ b/i18n/da.po Mon May 14 12:38:05 2018 +0200
@@ -13696,7 +13696,7 @@
msgstr ""
msgid ""
-"``allow_archive``\n"
+"``allow-archive``\n"
" List of archive format (bz2, gz, zip) allowed for downloading.\n"
" Default is empty."
msgstr ""
--- a/i18n/de.po Sat Apr 21 17:31:03 2018 +0900
+++ b/i18n/de.po Mon May 14 12:38:05 2018 +0200
@@ -17347,7 +17347,7 @@
msgstr ""
msgid ""
-"``allow_archive``\n"
+"``allow-archive``\n"
" List of archive format (bz2, gz, zip) allowed for downloading.\n"
" Default is empty."
msgstr ""
--- a/i18n/ja.po Sat Apr 21 17:31:03 2018 +0900
+++ b/i18n/ja.po Mon May 14 12:38:05 2018 +0200
@@ -23682,11 +23682,11 @@
" サーバの待ちうけアドレス。 (デフォルト値: ホストの持つ全アドレス)"
msgid ""
-"``allow_archive``\n"
+"``allow-archive``\n"
" List of archive format (bz2, gz, zip) allowed for downloading.\n"
" (default: empty)"
msgstr ""
-"``allow_archive``\n"
+"``allow-archive``\n"
" 利用可能なダウンロード向けのアーカイブ形式 (bz2, gz, zip) 一覧。\n"
" (デフォルト値: 空 = ダウンロード不可)"
--- a/i18n/pt_BR.po Sat Apr 21 17:31:03 2018 +0900
+++ b/i18n/pt_BR.po Mon May 14 12:38:05 2018 +0200
@@ -27391,11 +27391,11 @@
" (padrão: usa todos os endereços)"
msgid ""
-"``allow_archive``\n"
+"``allow-archive``\n"
" List of archive format (bz2, gz, zip) allowed for downloading.\n"
" (default: empty)"
msgstr ""
-"``allow_archive``\n"
+"``allow-archive``\n"
" Lista de formatos de pacote (bz2, gz, zip) permitidos para download.\n"
" (padrão: lista vazia)"
--- a/i18n/ro.po Sat Apr 21 17:31:03 2018 +0900
+++ b/i18n/ro.po Mon May 14 12:38:05 2018 +0200
@@ -12099,7 +12099,7 @@
msgstr ""
msgid ""
-"``allow_archive``\n"
+"``allow-archive``\n"
" List of archive format (bz2, gz, zip) allowed for downloading.\n"
" Default is empty."
msgstr ""
--- a/i18n/ru.po Sat Apr 21 17:31:03 2018 +0900
+++ b/i18n/ru.po Mon May 14 12:38:05 2018 +0200
@@ -19776,11 +19776,11 @@
" Адрес прослушиваемого интерфейса. По умолчанию все интерфейсы."
msgid ""
-"``allow_archive``\n"
+"``allow-archive``\n"
" List of archive format (bz2, gz, zip) allowed for downloading.\n"
" Default is empty."
msgstr ""
-"``allow_archive``\n"
+"``allow-archive``\n"
" Список форматов архивов (bz2, gz, zip), которые можно скачивать.\n"
" По умолчанию пуст."
--- a/i18n/sv.po Sat Apr 21 17:31:03 2018 +0900
+++ b/i18n/sv.po Mon May 14 12:38:05 2018 +0200
@@ -15034,7 +15034,7 @@
msgstr ""
msgid ""
-"``allow_archive``\n"
+"``allow-archive``\n"
" List of archive format (bz2, gz, zip) allowed for downloading.\n"
" Default is empty."
msgstr ""
--- a/mercurial/configitems.py Sat Apr 21 17:31:03 2018 +0900
+++ b/mercurial/configitems.py Mon May 14 12:38:05 2018 +0200
@@ -1225,7 +1225,8 @@
coreconfigitem('web', 'address',
default='',
)
-coreconfigitem('web', 'allow_archive',
+coreconfigitem('web', 'allow-archive',
+ alias=[('web', 'allow_archive')],
default=list,
)
coreconfigitem('web', 'allow_read',
--- a/mercurial/help/config.txt Sat Apr 21 17:31:03 2018 +0900
+++ b/mercurial/help/config.txt Mon May 14 12:38:05 2018 +0200
@@ -2329,7 +2329,7 @@
``address``
Interface address to bind to. (default: all)
-``allow_archive``
+``allow-archive``
List of archive format (bz2, gz, zip) allowed for downloading.
(default: empty)
--- a/mercurial/hgweb/webcommands.py Sat Apr 21 17:31:03 2018 +0900
+++ b/mercurial/hgweb/webcommands.py Mon May 14 12:38:05 2018 +0200
@@ -1162,7 +1162,7 @@
"""
type_ = web.req.qsparams.get('type')
- allowed = web.configlist("web", "allow_archive")
+ allowed = web.configlist("web", "allow-archive")
key = web.req.qsparams['node']
if type_ not in webutil.archivespecs:
--- a/mercurial/hgweb/webutil.py Sat Apr 21 17:31:03 2018 +0900
+++ b/mercurial/hgweb/webutil.py Mon May 14 12:38:05 2018 +0200
@@ -51,7 +51,7 @@
))
def archivelist(ui, nodeid, url=None):
- allowed = ui.configlist('web', 'allow_archive', untrusted=True)
+ allowed = ui.configlist('web', 'allow-archive', untrusted=True)
archives = []
for typ, spec in archivespecs.iteritems():
--- a/tests/test-archive.t Sat Apr 21 17:31:03 2018 +0900
+++ b/tests/test-archive.t Mon May 14 12:38:05 2018 +0200
@@ -94,7 +94,7 @@
$ echo "archivesubrepos = True" >> .hg/hgrc
$ cp .hg/hgrc .hg/hgrc-base
> test_archtype() {
- > echo "allow_archive = $1" >> .hg/hgrc
+ > echo "allow-archive = $1" >> .hg/hgrc
> test_archtype_run "$@"
> }
> test_archtype_deprecated() {
@@ -293,7 +293,7 @@
body: size=1451, sha1=4c5cf0f574446c44feb7f88f4e0e2a56bd92c352
- $ echo "allow_archive = gz bz2 zip" >> .hg/hgrc
+ $ echo "allow-archive = gz bz2 zip" >> .hg/hgrc
$ hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
$ cat hg.pid >> $DAEMON_PIDS
--- a/tests/test-hgweb-json.t Sat Apr 21 17:31:03 2018 +0900
+++ b/tests/test-hgweb-json.t Mon May 14 12:38:05 2018 +0200
@@ -101,7 +101,7 @@
$ echo '[web]' >> .hg/hgrc
- $ echo 'allow_archive = bz2' >> .hg/hgrc
+ $ echo 'allow-archive = bz2' >> .hg/hgrc
$ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E error.log
$ cat hg.pid >> $DAEMON_PIDS
--- a/tests/test-hgweb-symrev.t Sat Apr 21 17:31:03 2018 +0900
+++ b/tests/test-hgweb-symrev.t Mon May 14 12:38:05 2018 +0200
@@ -30,7 +30,7 @@
|
o 0:43c799df6e75
- $ hg serve --config web.allow_archive=zip -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log
+ $ hg serve --config web.allow-archive=zip -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log
$ cat hg.pid >> $DAEMON_PIDS
$ REVLINKS='href=[^>]+(rev=|/)(43c799df6e75|0|a7c1559b7bba|1|xyzzy|9d8c40cba617|2|tip|default)'
--- a/tests/test-largefiles-wireproto.t Sat Apr 21 17:31:03 2018 +0900
+++ b/tests/test-largefiles-wireproto.t Mon May 14 12:38:05 2018 +0200
@@ -26,7 +26,7 @@
> patterns=glob:**.dat
> usercache=${USERCACHE}
> [web]
- > allow_archive = zip
+ > allow-archive = zip
> [hooks]
> precommit=sh -c "echo \\"Invoking status precommit hook\\"; hg status"
> EOF