Patchwork [1,of,2] hgweb: use archivespecs (dict) instead of archives (tuple) for "in" check

login
register
mail settings
Submitter Anton Shestakov
Date Jan. 8, 2017, 1:52 a.m.
Message ID <3cecf85b42c6cf3e2d81.1483840375@neuro>
Download mbox | patch
Permalink /patch/18134/
State Accepted
Headers show

Comments

Anton Shestakov - Jan. 8, 2017, 1:52 a.m.
# HG changeset patch
# User Anton Shestakov <av6@dwimlabs.net>
# Date 1483809885 -28800
#      Sun Jan 08 01:24:45 2017 +0800
# Node ID 3cecf85b42c6cf3e2d81ff5d69e9328bb204d209
# Parent  3de9df6ee5bf7601aa3870f18304bbeb3ce351af
hgweb: use archivespecs (dict) instead of archives (tuple) for "in" check

Patch

diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py
--- a/mercurial/hgweb/webcommands.py
+++ b/mercurial/hgweb/webcommands.py
@@ -1034,7 +1034,7 @@  def archive(web, req, tmpl):
     allowed = web.configlist("web", "allow_archive")
     key = req.form['node'][0]
 
-    if type_ not in web.archives:
+    if type_ not in web.archivespecs:
         msg = 'Unsupported archive type: %s' % type_
         raise ErrorResponse(HTTP_NOT_FOUND, msg)