Patchwork [1,of,2] test-revset: show that order of heads() can be wrong

login
register
mail settings
Submitter Yuya Nishihara
Date June 27, 2018, 2:52 p.m.
Message ID <5aee640e2a99a305dc6f.1530111151@mimosa>
Download mbox | patch
Permalink /patch/32464/
State Accepted
Headers show

Comments

Yuya Nishihara - June 27, 2018, 2:52 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1530110037 -32400
#      Wed Jun 27 23:33:57 2018 +0900
# Node ID 5aee640e2a99a305dc6f5219c35d2140180169a1
# Parent  b4cfd803b3f2697928be9b3a96787bcee3447c7e
test-revset: show that order of heads() can be wrong

Patch

diff --git a/tests/test-revset.t b/tests/test-revset.t
--- a/tests/test-revset.t
+++ b/tests/test-revset.t
@@ -1357,8 +1357,40 @@  test author
   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")'