tests: add test to demonstrate issue5923
authorPulkit Goyal <7895pulkit@gmail.com>
Tue, 19 Jun 2018 23:21:44 +0530
changeset 3855 bce7afc21e1f
parent 3854 b1eb2dea6737
child 3856 9c0b37be8582
tests: add test to demonstrate issue5923 This will be fixed in upcoming patch.
tests/test-evolve.t
--- a/tests/test-evolve.t	Thu Jun 28 17:26:16 2018 +0200
+++ b/tests/test-evolve.t	Tue Jun 19 23:21:44 2018 +0530
@@ -1555,3 +1555,41 @@
 
   $ hg status newlyadded
   A newlyadded
+
+  $ cd ..
+
+Testing bookmark movement when `hg evolve` updates to successor (issue5923)
+
+  $ hg init issue5923
+  $ cd issue5923
+  $ echo foo > a
+  $ hg ci -Aqm "added a"
+
+  $ hg log -GT "{rev}:{node|short} {desc} {bookmarks}\n"
+  @  0:f7ad41964313 added a
+  
+  $ echo bar >> a
+  $ hg amend
+
+  $ hg log -GT "{rev}:{node|short} {desc} {bookmarks}\n"
+  @  1:ab832e43dd5a added a
+  
+  $ hg up f7ad41964313 --hidden
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  updated to hidden changeset f7ad41964313
+  (hidden revision 'f7ad41964313' was rewritten as: ab832e43dd5a)
+  working directory parent is obsolete! (f7ad41964313)
+  (use 'hg evolve' to update to its successor: ab832e43dd5a)
+
+  $ hg bookmark book
+
+  $ hg evolve
+  update:[1] added a
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  working directory is now at ab832e43dd5a
+
+  $ hg log -GT "{rev}:{node|short} {desc} ({bookmarks})\n" --hidden
+  @  1:ab832e43dd5a added a ()
+  
+  x  0:f7ad41964313 added a (book)
+