diff mercurial/hgweb/webcommands.py @ 37674:f83cb91b052e

revset: pass in lookup function instead of repo (API) And document that it's only for legacy lookup. If we have a repo, we're likely to do more things where that shouldn't be done.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 14 Apr 2018 12:57:32 +0900
parents aac97d043e6d
children 7738ae638b62
line wrap: on
line diff
--- a/mercurial/hgweb/webcommands.py	Sat Apr 14 12:44:40 2018 +0900
+++ b/mercurial/hgweb/webcommands.py	Sat Apr 14 12:57:32 2018 +0900
@@ -276,7 +276,8 @@
         if not funcsused.issubset(revset.safesymbols):
             return MODE_KEYWORD, query
 
-        mfunc = revset.match(web.repo.ui, revdef, repo=web.repo)
+        mfunc = revset.match(web.repo.ui, revdef,
+                             lookup=revset.lookupfn(web.repo))
         try:
             revs = mfunc(web.repo)
             return MODE_REVSET, revs