Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/hgweb/webcommands.py @ 34654:4182d2065e7a
configitems: drop redundant default of web.allow<archtype>
Otherwise develwarn would be sent to stderr. I've added blackbox logging
to capture warnings.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Fri, 13 Oct 2017 00:22:54 +0900 |
parents | f12de15c5711 |
children | e178fcaa3933 |
comparison
equal
deleted
inserted
replaced
34653:8bea493e7297 | 34654:4182d2065e7a |
---|---|
1111 if type_ not in web.archivespecs: | 1111 if type_ not in web.archivespecs: |
1112 msg = 'Unsupported archive type: %s' % type_ | 1112 msg = 'Unsupported archive type: %s' % type_ |
1113 raise ErrorResponse(HTTP_NOT_FOUND, msg) | 1113 raise ErrorResponse(HTTP_NOT_FOUND, msg) |
1114 | 1114 |
1115 if not ((type_ in allowed or | 1115 if not ((type_ in allowed or |
1116 web.configbool("web", "allow" + type_, False))): | 1116 web.configbool("web", "allow" + type_))): |
1117 msg = 'Archive type not allowed: %s' % type_ | 1117 msg = 'Archive type not allowed: %s' % type_ |
1118 raise ErrorResponse(HTTP_FORBIDDEN, msg) | 1118 raise ErrorResponse(HTTP_FORBIDDEN, msg) |
1119 | 1119 |
1120 reponame = re.sub(r"\W+", "-", os.path.basename(web.reponame)) | 1120 reponame = re.sub(r"\W+", "-", os.path.basename(web.reponame)) |
1121 cnode = web.repo.lookup(key) | 1121 cnode = web.repo.lookup(key) |