[PATCH 2 of 3] revset: remove false condition to process 'negate' operator

Yuya Nishihara yuya at tcha.org
Fri Sep 2 14:58:11 UTC 2016


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1470546807 -32400
#      Sun Aug 07 14:13:27 2016 +0900
# Node ID 04d0742aa7ecb239a06ba46e9f8ebe0c52a86e9d
# Parent  5cb90003deb87ae58f620657ec891df26e04c72a
revset: remove false condition to process 'negate' operator

'negate' is mapped to 'string' at the above clause.

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -2371,7 +2371,7 @@ def _optimize(x, small):
     elif op == 'negate':
         s = getstring(x[1], _("can't negate that"))
         return _optimize(('string', '-' + s), small)
-    elif op in 'string symbol negate':
+    elif op in 'string symbol':
         return smallbonus, x # single revisions are small
     elif op == 'and':
         wa, ta = _optimize(x[1], True)



More information about the Mercurial-devel mailing list