Re: D97: revset: pass repo when passing ui

2017-07-18 Thread martinvonz (Martin von Zweigbergk)
martinvonz added inline comments.

INLINE COMMENTS

> yuja wrote in cmdutil.py:2307
> Perhaps these two shouldn't pass `ui` nor `repo`. They evaluate
> internal query.
> 
> Passing `repo` means to take any valid old-style revisions
> ignoring the revset syntax.

Thanks, Yuja. This was fixed in flight by someone.

REPOSITORY
  rHG Mercurial

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

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

To: indygreg, #hg-reviewers, durin42
Cc: martinvonz, yuja, durin42, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


Re: D97: revset: pass repo when passing ui

2017-07-18 Thread indygreg (Gregory Szorc)
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=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
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


Re: D97: revset: pass repo when passing ui

2017-07-18 Thread yuja (Yuya Nishihara)
yuja added inline comments.

INLINE COMMENTS

> cmdutil.py:2307
> +matcher = revset.match(repo.ui, expr, repo=repo,
> +   order=revset.followorder)
>  revs = matcher(repo, revs)

Perhaps these two shouldn't pass `ui` nor `repo`. They evaluate
internal query.

Passing `repo` means to take any valid old-style revisions
ignoring the revset syntax.

REPOSITORY
  rHG Mercurial

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

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

To: indygreg, #hg-reviewers, durin42
Cc: yuja, durin42, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


Re: D97: revset: pass repo when passing ui

2017-07-17 Thread durin42 (Augie Fackler)
durin42 accepted this revision.
durin42 added a comment.
This revision is now accepted and ready to land.


  Taking this one, but going to punt on https://phab.mercurial-scm.org/D98 per 
the "consider this an RFC" comment I saw.

REPOSITORY
  rHG Mercurial

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

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

To: indygreg, #hg-reviewers, durin42
Cc: durin42, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel