test-revset: show that order of heads() can be wrong
authorYuya Nishihara <yuya@tcha.org>
Wed, 27 Jun 2018 23:33:57 +0900
changeset 38482 b2d5ad03f31a
parent 38481 de275ab362cb
child 38483 72621094505f
test-revset: show that order of heads() can be wrong
tests/test-revset.t
--- a/tests/test-revset.t	Wed Jun 27 10:21:07 2018 -0400
+++ b/tests/test-revset.t	Wed Jun 27 23:33:57 2018 +0900
@@ -1357,8 +1357,40 @@
   6
   7
   9
+
+Test heads
+
   $ log 'heads(6::)'
   7
+
+ heads() can be computed in subset '9:'
+
+  $ hg debugrevspec -s '9: & heads(all())'
+  * set:
+  <filteredset
+    <filteredset
+      <baseset [9]>,
+      <spanset+ 0:10>>,
+    <not
+      <filteredset
+        <baseset [9]>, set([0, 1, 2, 3, 4, 5, 6, 8])>>>
+  9
+
+ BROKEN: but should follow the order of the subset
+
+  $ log 'heads(all())'
+  7
+  9
+  $ log 'heads(tip:0)'
+  9
+  7
+  $ log 'tip:0 & heads(all())'
+  9
+  7
+  $ log 'tip:0 & heads(0:tip)'
+  7
+  9
+
   $ log 'keyword(issue)'
   6
   $ log 'keyword("test a")'