--- a/tests/test-branches.t Fri Jun 28 21:31:34 2019 +0530
+++ b/tests/test-branches.t Sat May 18 15:44:23 2019 +0530
@@ -958,6 +958,7 @@
it should abort:
$ hg ci -m "closing branch" --close-branch
abort: can only close branch heads
+ (use --force-close-branch to close branch from a non-head changeset)
[255]
$ hg up 0
@@ -972,3 +973,18 @@
@ 0: 9092f1db7931 added a
default
+Test --force-close-branch to close a branch from a non-head changeset:
+---------------------------------------------------------------------
+
+ $ hg show stack --config extensions.show=
+ o 1553 added c
+ o 5f6d added b
+ @ 9092 added a
+
+ $ hg ci -m "branch closed" --close-branch
+ abort: can only close branch heads
+ (use --force-close-branch to close branch from a non-head changeset)
+ [255]
+
+ $ hg ci -m "branch closed" --force-close-branch
+ created new head