diff tests/test-prune.t @ 6392:faea18a26188 mercurial-5.9

test-compat: merge mercurial-6.0 into mercurial-5.9
author Anton Shestakov <av6@dwimlabs.net>
date Mon, 06 Feb 2023 18:56:14 +0400
parents 36a746dda93a 9c243e98d0be
children 1328195f76a9
line wrap: on
line diff
--- a/tests/test-prune.t	Thu Dec 08 19:31:00 2022 +0400
+++ b/tests/test-prune.t	Mon Feb 06 18:56:14 2023 +0400
@@ -36,20 +36,20 @@
 ---------------------------------------
 
   $ hg prune --fold --pair
-  abort: can only specify one of pair, fold
-  [255]
+  abort: cannot specify both --pair and --fold
+  [10]
   $ hg prune --fold --biject
-  abort: no revisions specified to prune
-  [255]
+  abort: cannot specify both --biject and --fold
+  [10]
   $ hg prune --split --fold
-  abort: can only specify one of fold, split
-  [255]
+  abort: cannot specify both --fold and --split
+  [10]
   $ hg prune --split --fold --pair
-  abort: can only specify one of pair, fold, split
-  [255]
+  abort: cannot specify both --pair and --fold
+  [10]
   $ hg prune --split --fold --biject
-  abort: can only specify one of fold, split
-  [255]
+  abort: cannot specify both --fold and --split
+  [10]
 
 Check simple case
 ----------------------------
@@ -172,7 +172,7 @@
 
   $ hg prune 'desc("add dd")' -s 'desc("add nD")' -s 'desc("add nC")'
   abort: please add --split if you want to do a split
-  [255]
+  [10]
   $ hg prune 'desc("add dd")' -s 'desc("add nD")' -s 'desc("add nC")' --split
   1 changesets pruned
   $ hg debugobsolete
@@ -201,9 +201,9 @@
 two old, two new (should be denied)
 
   $ hg prune 'desc("add cc")' 'desc("add bb")' -s 'desc("add nD")' -s 'desc("add nC")'
-  abort: Can't use multiple successors for multiple precursors
+  abort: cannot use multiple successors for multiple precursors
   (use --pair to mark a series as a replacement for another)
-  [255]
+  [10]
   $ hg debugobsolete
   9d206ffc875e1bc304590549be293be36821e66c 0 {47d2a3944de8b013de3be9578e8e344ea2e6c097} (Sat Dec 15 00:00:00 1979 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'blah'}
   7c3bad9141dcb46ff89abf5f61856facd56e476c 0 {1f0dee641bb7258c56bd60e93edfa2405381c41e} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'test'}
@@ -216,7 +216,7 @@
 
   $ hg prune 'desc("add cc")' 'desc("add bb")' -s 'desc("add nB")'
   abort: please add --fold if you want to do a fold
-  [255]
+  [10]
   $ hg prune 'desc("add cc")' 'desc("add bb")' -s 'desc("add nB")' --fold
   2 changesets pruned
   $ hg debugobsolete
@@ -295,7 +295,7 @@
   $ hg prune -B nostrip
   bookmark 'nostrip' deleted
   abort: no revisions specified to prune
-  [255]
+  [10]
   $ hg tag --remove --local a
   $ hg prune -B todelete
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -488,3 +488,16 @@
   (use 'hg evolve' to update to its parent successor)
 
   $ cd ..
+
+Test that pruning (without any successors) an already pruned
+revision doesn't give false warning about divergence creation:
+
+  $ hg init nofalsewarn
+  $ cd nofalsewarn
+  $ echo a > A
+  $ hg ci -Aqm "added a"
+  $ hg ci --amend -m "added A"
+  $ hg prune 0 --hidden
+  1 changesets pruned
+
+  $ cd ..