tests: add a test showing bookmark not moving in-case of `hg fold` stable
authorPulkit Goyal <7895pulkit@gmail.com>
Mon, 22 Jan 2018 13:33:58 +0530
branchstable
changeset 3450 a8596ac13fe8
parent 3448 8ea3eccba746
child 3451 f062a4719e46
tests: add a test showing bookmark not moving in-case of `hg fold` This patch adds a test showing that bookmark is not moved when doing `hg fold`. This test represents issue 5772.
tests/test-fold.t
--- a/tests/test-fold.t	Wed Jan 24 15:19:17 2018 +0100
+++ b/tests/test-fold.t	Mon Jan 22 13:33:58 2018 +0530
@@ -8,7 +8,7 @@
   > [extensions]
   > evolve=
   > [ui]
-  > logtemplate = '{rev} - {node|short} {desc|firstline} [{author}] ({phase})\n'
+  > logtemplate = '{rev} - {node|short} {desc|firstline} [{author}] ({phase}) {bookmarks}\n'
   > EOF
 
   $ hg init fold-tests
@@ -16,6 +16,7 @@
   $ hg debugbuilddag .+3:branchpoint+4*branchpoint+2
   $ hg up 'desc("r7")'
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ hg bookmark bm1
   $ hg log -G
   o  10 - a8407f9a3dc1 r10 [debugbuilddag] (draft)
   |
@@ -23,7 +24,7 @@
   |
   o  8 - abf57d94268b r8 [debugbuilddag] (draft)
   |
-  | @  7 - 4de32a90b66c r7 [debugbuilddag] (draft)
+  | @  7 - 4de32a90b66c r7 [debugbuilddag] (draft) bm1
   | |
   | o  6 - f69452c5b1af r6 [debugbuilddag] (draft)
   | |
@@ -87,6 +88,37 @@
   3 changesets folded
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
+Checking whether the bookmarks are moved or not
+
+  $ hg log -G
+  @  11 - 198b5c405d01 r5 [debugbuilddag] (draft)
+  |
+  | o  10 - a8407f9a3dc1 r10 [debugbuilddag] (draft)
+  | |
+  | o  9 - 529dfc5bb875 r9 [debugbuilddag] (draft)
+  | |
+  | o  8 - abf57d94268b r8 [debugbuilddag] (draft)
+  | |
+  | | x  7 - 4de32a90b66c r7 [debugbuilddag] (draft) bm1
+  | | |
+  | | x  6 - f69452c5b1af r6 [debugbuilddag] (draft)
+  | | |
+  +---x  5 - c8d03c1b5e94 r5 [debugbuilddag] (draft)
+  | |
+  o |  4 - bebd167eb94d r4 [debugbuilddag] (draft)
+  |/
+  o  3 - 2dc09a01254d r3 [debugbuilddag] (draft)
+  |
+  o  2 - 01241442b3c2 r2 [debugbuilddag] (draft)
+  |
+  o  1 - 66f7d451a68b r1 [debugbuilddag] (draft)
+  |
+  o  0 - 1ea73414a91b r0 [debugbuilddag] (public)
+  
+XXX: bookmark not moved, manually moving it (issue5772)
+  $ hg bookmark -r . bm1
+  moving bookmark 'bm1' forward from 4de32a90b66c
+
 (test inherited from test-evolve.t)
 
   $ hg fold --from 6 # want to run hg fold 6
@@ -95,7 +127,7 @@
   [255]
 
   $ hg log -G
-  @  11 - 198b5c405d01 r5 [debugbuilddag] (draft)
+  @  11 - 198b5c405d01 r5 [debugbuilddag] (draft) bm1
   |
   | o  10 - a8407f9a3dc1 r10 [debugbuilddag] (draft)
   | |
@@ -124,7 +156,7 @@
   $ hg log -G
   o  12 - b568edbee6e0 r8 [debugbuilddag] (draft)
   |
-  | @  11 - 198b5c405d01 r5 [debugbuilddag] (draft)
+  | @  11 - 198b5c405d01 r5 [debugbuilddag] (draft) bm1
   | |
   | o  4 - bebd167eb94d r4 [debugbuilddag] (draft)
   |/
@@ -144,8 +176,9 @@
   $ hg commit '-m r11'
   $ hg up '.^'
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  (leaving bookmark bm1)
   $ hg log -G
-  o  13 - 14d0e0da8e91 r11 [test] (draft)
+  o  13 - 14d0e0da8e91 r11 [test] (draft) bm1
   |
   | o  12 - b568edbee6e0 r8 [debugbuilddag] (draft)
   | |
@@ -192,9 +225,13 @@
   $ hg log -G
   @  14 - 29b470a33594 r5 [Victor Rataxes <victor@rhino.savannah>] (draft)
   |
-  | o  12 - b568edbee6e0 r8 [debugbuilddag] (draft)
+  | x  13 - 14d0e0da8e91 r11 [test] (draft) bm1
   | |
-  o |  4 - bebd167eb94d r4 [debugbuilddag] (draft)
+  | | o  12 - b568edbee6e0 r8 [debugbuilddag] (draft)
+  | | |
+  | x |  11 - 198b5c405d01 r5 [debugbuilddag] (draft)
+  |/ /
+  o /  4 - bebd167eb94d r4 [debugbuilddag] (draft)
   |/
   o  3 - 2dc09a01254d r3 [debugbuilddag] (draft)
   |
@@ -211,7 +248,13 @@
   $ hg log -G
   @  15 - 91880abed0f2 r4 [test] (draft)
   |
-  | o  12 - b568edbee6e0 r8 [debugbuilddag] (draft)
+  | x  13 - 14d0e0da8e91 r11 [test] (draft) bm1
+  | |
+  +---o  12 - b568edbee6e0 r8 [debugbuilddag] (draft)
+  | |
+  | x  11 - 198b5c405d01 r5 [debugbuilddag] (draft)
+  | |
+  | x  4 - bebd167eb94d r4 [debugbuilddag] (draft)
   |/
   o  3 - 2dc09a01254d r3 [debugbuilddag] (draft)
   |