Mercurial > evolve
diff tests/test-topic-flow-publish-bare.t @ 4647:228caeb8b7af
topic: add a simple option to reject publishing
The option is pretty basic but it can be used as base to build larger feature.
The main target for going in this direction is to be able to distinct between
user that are "simple contributors" pushing topic for review and the
"maintainers" or "automation" that can publish changesets.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 27 May 2019 03:42:35 +0200 |
parents | 1bc4b0807c37 |
children | af9f40236037 |
line wrap: on
line diff
--- 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]