tests: demonstrate prune --pair not moving bookmark correctly stable
authorAnton Shestakov <av6@dwimlabs.net>
Sat, 22 Jun 2019 18:37:21 +0800
branchstable
changeset 4698 b89495215c6e
parent 4692 a9cf0ba6e6c7
child 4699 dfd88e3fa90a
tests: demonstrate prune --pair not moving bookmark correctly After `mkcommit n2` line the bookmark is on the correct changeset, but when we prune --pair the two newly created changesets (revs 13 and 14), the bookmark gets moved to their ancestor (rev 0). Instead, it should've moved to the last of their successors (rev 12).
tests/test-prune.t
--- a/tests/test-prune.t	Fri Jun 14 18:17:03 2019 +0800
+++ b/tests/test-prune.t	Sat Jun 22 18:37:21 2019 +0800
@@ -229,10 +229,11 @@
   814c38b95e72dfe2cbf675b1649ea9d780c89a80 6f6f25e4f748d8f7571777e6e168aedf50350ce8 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '9', 'operation': 'prune', 'user': 'test'}
   354011cd103f58bbbd9091a3cee6d6a6bd0dddf7 6f6f25e4f748d8f7571777e6e168aedf50350ce8 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'prune', 'user': 'test'}
 
-two old, two new with --pair
+two old, two new with --pair (also test bookmark move)
 
   $ hg up 0
   0 files updated, 0 files merged, 4 files removed, 0 files unresolved
+  $ hg bookmark prune-pair-book
   $ mkcommit n1
   created new head
   $ mkcommit n2
@@ -252,11 +253,16 @@
   354011cd103f58bbbd9091a3cee6d6a6bd0dddf7 6f6f25e4f748d8f7571777e6e168aedf50350ce8 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'prune', 'user': 'test'}
   cb7f8f706a6532967b98cf8583a81baab79a0fa7 8ee176ff1d4b2034ce51e3efc579c2de346b631d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'prune', 'user': 'test'}
   21b6f2f1cece8c10326e575dd38239189d467190 6e8148413dd541855b72a920a90c06fca127c7e7 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'prune', 'user': 'test'}
+  $ hg log --hidden -r 'desc("add n2") + desc("add nE") + bookmark("prune-pair-book")'
+  14:21b6f2f1cece[] (obsolete/draft) add n2
+  12:6e8148413dd5[] (draft) add nE
+  0:1f0dee641bb7[BABAR prune-pair-book] (public) add a
 
 test hg strip replacement
 
   $ hg up 10
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  (leaving bookmark prune-pair-book)
   $ mkcommit n1
   created new head
   $ mkcommit n2