diff mercurial/hgweb/webcommands.py @ 34100:08346a8fa65f

cleanup: rename "matchfn" to "match" where obviously a matcher We usually call matchers either "match" or "m" and reserve "matchfn" for functions. Differential Revision: https://phab.mercurial-scm.org/D641
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 05 Sep 2017 15:06:45 -0700
parents 2943141f5e07
children a6c18628dff1
line wrap: on
line diff
--- a/mercurial/hgweb/webcommands.py	Wed Sep 06 08:22:54 2017 -0700
+++ b/mercurial/hgweb/webcommands.py	Tue Sep 05 15:06:45 2017 -0700
@@ -1111,13 +1111,13 @@
 
     ctx = webutil.changectx(web.repo, req)
     pats = []
-    matchfn = scmutil.match(ctx, [])
+    match = scmutil.match(ctx, [])
     file = req.form.get('file', None)
     if file:
         pats = ['path:' + file[0]]
-        matchfn = scmutil.match(ctx, pats, default='path')
+        match = scmutil.match(ctx, pats, default='path')
         if pats:
-            files = [f for f in ctx.manifest().keys() if matchfn(f)]
+            files = [f for f in ctx.manifest().keys() if match(f)]
             if not files:
                 raise ErrorResponse(HTTP_NOT_FOUND,
                     'file(s) not found: %s' % file[0])
@@ -1132,7 +1132,7 @@
     req.respond(HTTP_OK, mimetype)
 
     archival.archive(web.repo, req, cnode, artype, prefix=name,
-                     matchfn=matchfn,
+                     matchfn=match,
                      subrepos=web.configbool("web", "archivesubrepos"))
     return []