# HG changeset patch # User Boris Feld <boris.f...@octobus.net> # Date 1523367822 -7200 # Tue Apr 10 15:43:42 2018 +0200 # Node ID b52727111f7f17524fd8e8982af59b5f372cc7c3 # Parent 00090d394d4e0a7c2637f161493353530dcf739d # EXP-Topic noname # Available At https://bitbucket.org/octobus/mercurial-devel/ # hg pull https://bitbucket.org/octobus/mercurial-devel/ -r b52727111f7f revset: use and explicit loop to resolve each spec
This is useful to clarify the next changeset. diff --git a/mercurial/revset.py b/mercurial/revset.py --- a/mercurial/revset.py +++ b/mercurial/revset.py @@ -2190,14 +2190,17 @@ def matchany(ui, specs, repo=None, local return mfunc if not all(specs): raise error.ParseError(_("empty query")) + lookup = None if repo and legacycompat: lookup = lookupfn(repo) - if len(specs) == 1: - tree = revsetlang.parse(specs[0], lookup) + parsedspecs = [] + for s in specs: + parsedspecs.append(revsetlang.parse(s, lookup)) + if len(parsedspecs) == 1: + tree = parsedspecs[0] else: - tree = ('or', - ('list',) + tuple(revsetlang.parse(s, lookup) for s in specs)) + tree = ('or', ('list',) + tuple(parsedspecs)) aliases = [] warn = None _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel