Mercurial > evolve
comparison 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 |
comparison
equal
deleted
inserted
replaced
4646:7b986968700b | 4647:228caeb8b7af |
---|---|
292 | | | 292 | | |
293 | o 5:0db08e758601 c_aE0 public branchA | 293 | o 5:0db08e758601 c_aE0 public branchA |
294 |/ | 294 |/ |
295 o 0:ea207398892e ROOT public default | 295 o 0:ea207398892e ROOT public default |
296 | 296 |
297 | |
298 Checking the option to prevent publishing | |
299 ========================================= | |
300 | |
301 Alone the option is a bit too restrictive to be useful. However combined with | |
302 other tooling or extensions is can become an important permission tool. | |
303 | |
304 $ hg log -r 'draft()' | |
305 changeset: 8:858be9a8daaf | |
306 topic: bar | |
307 user: test | |
308 date: Thu Jan 01 00:00:00 1970 +0000 | |
309 summary: c_dH0 | |
310 | |
311 changeset: 10:abb5c84eb9e9 | |
312 topic: bar | |
313 parent: 8:858be9a8daaf | |
314 user: test | |
315 date: Thu Jan 01 00:00:00 1970 +0000 | |
316 summary: c_dJ0 | |
317 | |
318 $ hg phase --public -r 8 --config experimental.topic.allow-publish=no | |
319 abort: rejecting publishing of changeset 858be9a8daaf | |
320 [255] | |
321 $ hg phase --public -r 10 --config experimental.topic.allow-publish=no | |
322 abort: rejecting publishing of changeset 858be9a8daaf and 1 others | |
323 [255] |