test: avoid using debugdrawdag in 'test-topic-debugcb.t'
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 01 Sep 2017 16:22:49 +0200
changeset 2902 f6e297fda5c6
parent 2901 52e6b28704a7
child 2903 d16781d7a061
test: avoid using debugdrawdag in 'test-topic-debugcb.t' The 'debugdrawdag' utility adds local tags that prevent hidden changeset to get hidden. We will do without that extension for now.
tests/test-topic-debugcb.t
--- a/tests/test-topic-debugcb.t	Tue Aug 29 18:13:33 2017 +0530
+++ b/tests/test-topic-debugcb.t	Fri Sep 01 16:22:49 2017 +0200
@@ -132,54 +132,52 @@
   $ rm -rf repo
   $ hg init setup1
   $ cd setup1
-  $ hg debugdrawdag <<EOF
-  > D F
-  > | |
-  > C E
-  > |/
-  > B
-  > |
-  > A
-  > EOF
+  $ echo "Hello" > A
+  $ hg commit -Aqm "A"
+  $ echo "Hello" > B
+  $ hg commit -Aqm "B"
+  $ echo "Hello" > C
+  $ hg commit -Aqm "C"
+  $ echo "Hello" > D
+  $ hg commit -Aqm "D"
+  $ hg up 'desc(B)'
+  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
+  $ echo "Hello" > E
+  $ hg commit -Aqm "E"
+  $ echo "Hello" > F
+  $ hg commit -Aqm "F"
+  $ hg bookmark -r 'desc(D)' bar
+  $ hg bookmark -r 'desc(F)' foo
 
   $ hg log -G
-  o  [5:11abe3fb10b8] F
+  @  [5:5a63fc519ddc] F
+  |    bookmark: foo
+  o  [4:a9fc8fb0c70c] E
   |
-  | o  [4:f585351a92f8] D
-  | |
-  o |  [3:49cb92066bfd] E
-  | |
-  | o  [2:26805aba1e60] C
+  | o  [3:e92ae92e366f] D
+  | |    bookmark: bar
+  | o  [2:9cc6a71c9557] C
   |/
-  o  [1:112478962961] B
+  o  [1:a7922543592c] B
   |
-  o  [0:426bada5c675] A
+  o  [0:fc58adec4bcd] A
   
-  $ hg bookmark -r 5 foo
-  $ hg bookmark -r 4 bar
   $ hg debugconvertbookmark --all
   changed topic to "bar" on 2 revisions
+  switching to topic foo
   changed topic to "foo" on 2 revisions
   $ hg log -G
-  o  [9:f07a5aaa3365] F
+  @  [9:994cbef2c2d2] F
   |    topic: foo
-  o  [8:00a25ca4fa07] E
+  o  [8:b9d8ef5d5b8a] E
   |    topic: foo
-  | o  [7:603a45fb0033] D
+  | o  [7:e8ba703ef9ab] D
   | |    topic: bar
-  | o  [6:67dd4179b021] C
+  | o  [6:6307829aaf11] C
   |/     topic: bar
-  | x  [5:11abe3fb10b8] F
-  | |
-  | | x  [4:f585351a92f8] D
-  | | |
-  | x |  [3:49cb92066bfd] E
-  |/ /
-  | x  [2:26805aba1e60] C
-  |/
-  o  [1:112478962961] B
+  o  [1:a7922543592c] B
   |
-  o  [0:426bada5c675] A
+  o  [0:fc58adec4bcd] A
   
 Another Setup
 =============
@@ -188,49 +186,46 @@
   $ rm -rf setup1
   $ hg init setup2
   $ cd setup2
-  $ hg debugdrawdag <<EOF
-  > E
-  > |
-  > D
-  > |
-  > C
-  > |
-  > B
-  > |
-  > A
-  > EOF
+  $ echo "Hello" > A
+  $ hg commit -Aqm "A"
+  $ hg phase --public .
+  $ echo "Hello" > B
+  $ hg commit -Aqm "B"
+  $ echo "Hello" > C
+  $ hg commit -Aqm "C"
+  $ hg bookmark -r . bar
+  $ echo "Hello" > D
+  $ hg commit -Aqm "D"
+  $ echo "Hello" > E
+  $ hg commit -Aqm "E"
+  $ hg bookmark -r . foo
 
   $ hg log -G
-  o  [4:9bc730a19041] E
-  |
-  o  [3:f585351a92f8] D
-  |
-  o  [2:26805aba1e60] C
+  @  [4:ef9d596cf6ea] E
+  |    bookmark: foo
+  o  [3:e92ae92e366f] D
   |
-  o  [1:112478962961] B
+  o  [2:9cc6a71c9557] C
+  |    bookmark: bar
+  o  [1:a7922543592c] B
   |
-  o  [0:426bada5c675] A
+  o  [0:fc58adec4bcd] A
   
-  $ hg bookmark -r 4 foo
-  $ hg bookmark -r 2 bar
 
 XXX: this should bot only put topic 'foo' on 3,4 but also 'bar' on 0,1,2
 
   $ hg debugconvertbookmark --all
+  switching to topic foo
   changed topic to "foo" on 2 revisions
 
   $ hg log -G
-  o  [6:4442f18c04c6] E
+  @  [6:e2bbb25b8882] E
   |    topic: foo
-  o  [5:0f81d1dec575] D
+  o  [5:71bced29cbae] D
   |    topic: foo
-  | x  [4:9bc730a19041] E
-  | |
-  | x  [3:f585351a92f8] D
-  |/
-  o  [2:26805aba1e60] C
+  o  [2:9cc6a71c9557] C
   |    bookmark: bar
-  o  [1:112478962961] B
+  o  [1:a7922543592c] B
   |
-  o  [0:426bada5c675] A
+  o  [0:fc58adec4bcd] A