comparison mercurial/hgweb/webcommands.py @ 38215:f715faeaceee

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
author David Demelier <markand@malikania.fr>
date Mon, 14 May 2018 12:38:05 +0200
parents 2aa0217bb655
children 5faaa31a6082
comparison
equal deleted inserted replaced
38214:2aa0217bb655 38215:f715faeaceee
1160 1160
1161 No template is used for this handler. Raw, binary content is generated. 1161 No template is used for this handler. Raw, binary content is generated.
1162 """ 1162 """
1163 1163
1164 type_ = web.req.qsparams.get('type') 1164 type_ = web.req.qsparams.get('type')
1165 allowed = web.configlist("web", "allow_archive") 1165 allowed = web.configlist("web", "allow-archive")
1166 key = web.req.qsparams['node'] 1166 key = web.req.qsparams['node']
1167 1167
1168 if type_ not in webutil.archivespecs: 1168 if type_ not in webutil.archivespecs:
1169 msg = 'Unsupported archive type: %s' % type_ 1169 msg = 'Unsupported archive type: %s' % type_
1170 raise ErrorResponse(HTTP_NOT_FOUND, msg) 1170 raise ErrorResponse(HTTP_NOT_FOUND, msg)