Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/hgweb/webcommands.py @ 30734:b9e49f7b0220
hgweb: use archivespecs (dict) instead of archives (tuple) for "in" check
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Sun, 08 Jan 2017 01:24:45 +0800 |
parents | d83ca854fa21 |
children | 96f811bceb85 |
comparison
equal
deleted
inserted
replaced
30733:66448a53bdac | 30734:b9e49f7b0220 |
---|---|
1032 | 1032 |
1033 type_ = req.form.get('type', [None])[0] | 1033 type_ = req.form.get('type', [None])[0] |
1034 allowed = web.configlist("web", "allow_archive") | 1034 allowed = web.configlist("web", "allow_archive") |
1035 key = req.form['node'][0] | 1035 key = req.form['node'][0] |
1036 | 1036 |
1037 if type_ not in web.archives: | 1037 if type_ not in web.archivespecs: |
1038 msg = 'Unsupported archive type: %s' % type_ | 1038 msg = 'Unsupported archive type: %s' % type_ |
1039 raise ErrorResponse(HTTP_NOT_FOUND, msg) | 1039 raise ErrorResponse(HTTP_NOT_FOUND, msg) |
1040 | 1040 |
1041 if not ((type_ in allowed or | 1041 if not ((type_ in allowed or |
1042 web.configbool("web", "allow" + type_, False))): | 1042 web.configbool("web", "allow" + type_, False))): |