tests/test-topic-flow-publish-bare.t
changeset 4647 228caeb8b7af
parent 3769 1bc4b0807c37
child 5266 af9f40236037
--- a/tests/test-topic-flow-publish-bare.t	Tue Jun 04 10:07:08 2019 +0200
+++ b/tests/test-topic-flow-publish-bare.t	Mon May 27 03:42:35 2019 +0200
@@ -294,3 +294,30 @@
   |/
   o  0:ea207398892e ROOT public default
   
+
+Checking the option to prevent publishing
+=========================================
+
+Alone the option is a bit too restrictive to be useful. However combined with
+other tooling or extensions is can become an important permission tool.
+
+  $ hg log -r 'draft()'
+  changeset:   8:858be9a8daaf
+  topic:       bar
+  user:        test
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  summary:     c_dH0
+  
+  changeset:   10:abb5c84eb9e9
+  topic:       bar
+  parent:      8:858be9a8daaf
+  user:        test
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  summary:     c_dJ0
+  
+  $ hg phase --public -r 8 --config experimental.topic.allow-publish=no
+  abort: rejecting publishing of changeset 858be9a8daaf
+  [255]
+  $ hg phase --public -r 10 --config experimental.topic.allow-publish=no
+  abort: rejecting publishing of changeset 858be9a8daaf and 1 others
+  [255]