diff tests/test-revset.t @ 14153:f8047a059ca0

revset: avoid over-aggresive optimizations of non-filtering functions (issue2549) When limit, last, min and max were evaluated they worked on a reduced set in the wrong way. Now they work on an unrestricted set (the whole repo) and get limited later on.
author Mads Kiilerich <mads@kiilerich.com>
date Sun, 01 May 2011 17:35:05 +0200
parents 9f5a0acb0056
children 93731b3efd0d
line wrap: on
line diff
--- a/tests/test-revset.t	Sun May 01 17:35:05 2011 +0200
+++ b/tests/test-revset.t	Sun May 01 17:35:05 2011 +0200
@@ -435,3 +435,11 @@
   ('func', ('symbol', 'reverse'), ('func', ('symbol', 'sort'), ('list', ('or', ('symbol', '2'), ('symbol', '3')), ('symbol', 'date'))))
   3
   2
+
+issue2549 - correct optimizations
+
+  $ log 'limit(1 or 2 or 3, 2) and not 2'
+  1
+  $ log 'max(1 or 2) and not 2'
+  $ log 'min(1 or 2) and not 1'
+  $ log 'last(1 or 2, 1) and not 2'