diff mercurial/revsetlang.py @ 34038:37b82485097f

revset: do not flip "and" arguments when optimizing Rewrite `flipand(y, x)` to `andsmally(x, y)` so the AST order is unchanged, which could be more friendly to developers. Differential Revision: https://phab.mercurial-scm.org/D579
author Jun Wu <quark@fb.com>
date Wed, 30 Aug 2017 16:05:12 -0700
parents 96f249dce03e
children b862e6fca7ac
line wrap: on
line diff
--- a/mercurial/revsetlang.py	Wed Aug 30 22:51:28 2017 +0900
+++ b/mercurial/revsetlang.py	Wed Aug 30 16:05:12 2017 -0700
@@ -374,7 +374,7 @@
         if tb is not None and tb[0] == 'not':
             return wa, ('difference', ta, tb[1])
         if wa > wb:
-            return w, ('flipand', tb, ta)
+            op = 'andsmally'
         return w, (op, ta, tb)
     elif op == 'or':
         # fast path for machine-generated expression, that is likely to have