revset: remove unused 'only' from methods table
authorYuya Nishihara <yuya@tcha.org>
Fri, 15 May 2015 22:38:24 +0900
changeset 25105 2f34746c27df
parent 25104 d6453f6fbdba
child 25106 6f15114bdcc3
revset: remove unused 'only' from methods table The infix 'only' operator is mapped to 'only()' function by optimize(), so it won't be looked up as a method. The test shows it.
mercurial/revset.py
tests/test-revset.t
--- a/mercurial/revset.py	Tue Apr 14 16:23:54 2015 -0400
+++ b/mercurial/revset.py	Fri May 15 22:38:24 2015 +0900
@@ -2094,7 +2094,6 @@
     "ancestor": ancestorspec,
     "parent": parentspec,
     "parentpost": p1,
-    "only": only,
 }
 
 def optimize(x, small):
--- a/tests/test-revset.t	Tue Apr 14 16:23:54 2015 -0400
+++ b/tests/test-revset.t	Fri May 15 22:38:24 2015 +0900
@@ -615,6 +615,24 @@
   <baseset+ [8, 9]>
   8
   9
+  $ try --optimize '(9)%(5)'
+  (only
+    (group
+      ('symbol', '9'))
+    (group
+      ('symbol', '5')))
+  * optimized:
+  (func
+    ('symbol', 'only')
+    (list
+      ('symbol', '9')
+      ('symbol', '5')))
+  * set:
+  <baseset+ [8, 9, 2, 4]>
+  2
+  4
+  8
+  9
 
 Test the order of operations