diff -r 73203cdfe3fe -r 8aca89a694d4 mercurial/revset.py --- a/mercurial/revset.py Fri Jan 04 05:26:13 2019 +0100 +++ b/mercurial/revset.py Fri Jan 04 13:41:21 2019 +0100 @@ -125,6 +125,13 @@ return baseset([x]) return baseset() +def rawsmartset(repo, subset, x, order): + """argument is already a smartset, use that directly""" + if order == followorder: + return subset & x + else: + return x & subset + def rangeset(repo, subset, x, y, order): m = getset(repo, fullreposet(repo), x) n = getset(repo, fullreposet(repo), y) @@ -2216,6 +2223,7 @@ "ancestor": ancestorspec, "parent": parentspec, "parentpost": parentpost, + "smartset": rawsmartset, } subscriptrelations = {