revset: drop redundant filteredset from right-hand side set of "or" operation
authorYuya Nishihara <yuya@tcha.org>
Mon, 30 Mar 2015 20:56:37 +0900
changeset 25129 40a2cf1c765b
parent 25128 631766d1f57a
child 25130 a94ef7f517e0
revset: drop redundant filteredset from right-hand side set of "or" operation Since 5548f558db3d, it should no longer be necessary because the addset can remove duplicates correctly.
mercurial/revset.py
tests/test-revset.t
--- a/mercurial/revset.py	Sun May 10 05:11:13 2015 -0700
+++ b/mercurial/revset.py	Mon Mar 30 20:56:37 2015 +0900
@@ -360,7 +360,7 @@
 
 def orset(repo, subset, x, y):
     xl = getset(repo, subset, x)
-    yl = getset(repo, subset - xl, y)
+    yl = getset(repo, subset, y)
     return xl + yl
 
 def notset(repo, subset, x):
--- a/tests/test-revset.t	Sun May 10 05:11:13 2015 -0700
+++ b/tests/test-revset.t	Mon Mar 30 20:56:37 2015 +0900
@@ -889,9 +889,7 @@
   * set:
   <addset
     <baseset [5, 3, 1]>,
-    <filteredset
-      <filteredset
-        <fullreposet+ 0:9>>>>
+    <generatorset+>>
   5
   3
   1
@@ -913,8 +911,7 @@
   * set:
   <addset+
     <generatorset+>,
-    <filteredset
-      <baseset [5, 3, 1]>>>
+    <baseset [5, 3, 1]>>
   0
   1
   2
@@ -1432,8 +1429,7 @@
   <addset
     <baseset [9]>,
     <filteredset
-      <filteredset
-        <fullreposet+ 0:9>>>>
+      <fullreposet+ 0:9>>>
   9
 
   $ try 'd(2:5)'