D97: revset: pass repo when passing ui

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Tue Jul 18 14:41:41 EDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rHG2858f7d10344: revset: pass repo when passing ui (authored by indygreg).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D97?vs=181&id=275

REVISION DETAIL
  https://phab.mercurial-scm.org/D97

AFFECTED FILES
  mercurial/cmdutil.py
  mercurial/hgweb/webcommands.py
  mercurial/templater.py

CHANGE DETAILS

diff --git a/mercurial/templater.py b/mercurial/templater.py
--- a/mercurial/templater.py
+++ b/mercurial/templater.py
@@ -874,7 +874,7 @@
     repo = ctx.repo()
 
     def query(expr):
-        m = revsetmod.match(repo.ui, expr)
+        m = revsetmod.match(repo.ui, expr, repo=repo)
         return m(repo)
 
     if len(args) > 1:
diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py
--- a/mercurial/hgweb/webcommands.py
+++ b/mercurial/hgweb/webcommands.py
@@ -260,7 +260,7 @@
         if not funcsused.issubset(revset.safesymbols):
             return MODE_KEYWORD, query
 
-        mfunc = revset.match(web.repo.ui, revdef)
+        mfunc = revset.match(web.repo.ui, revdef, repo=web.repo)
         try:
             revs = mfunc(web.repo)
             return MODE_REVSET, revs
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -2448,7 +2448,8 @@
         if not (revs.isdescending() or revs.istopo()):
             revs.sort(reverse=True)
     if expr:
-        matcher = revset.match(repo.ui, expr, order=revset.followorder)
+        matcher = revset.match(repo.ui, expr, repo=repo,
+                               order=revset.followorder)
         revs = matcher(repo, revs)
     if limit is not None:
         limitedrevs = []
@@ -2474,7 +2475,8 @@
         return smartset.baseset([]), None, None
     expr, filematcher = _makelogrevset(repo, pats, opts, revs)
     if expr:
-        matcher = revset.match(repo.ui, expr, order=revset.followorder)
+        matcher = revset.match(repo.ui, expr, repo=repo,
+                               order=revset.followorder)
         revs = matcher(repo, revs)
     if limit is not None:
         limitedrevs = []



EMAIL PREFERENCES
  https://phab.mercurial-scm.org/settings/panel/emailpreferences/

To: indygreg, #hg-reviewers, durin42
Cc: yuja, durin42, mercurial-devel


More information about the Mercurial-devel mailing list