# HG changeset patch # User Aurélien Campéas # Date 1505999354 -7200 # Node ID 946b1baa8c38abf6e6a7e5356cc6bb190b8d3f77 # Parent c62b3776fec38f841b2a2accefded128c15863c2 topics/tuto: activate the `enforce-topic` option This really help users to stick within topics. diff -r c62b3776fec3 -r 946b1baa8c38 tests/test-topic-tutorial.t --- a/tests/test-topic-tutorial.t Thu Sep 21 14:05:27 2017 +0200 +++ b/tests/test-topic-tutorial.t Thu Sep 21 15:09:14 2017 +0200 @@ -684,6 +684,37 @@ $ hg topic +Keep working within topics +========================== + +Making sure all your new local commit are made within a topic will help your +organise your work. It is possible to ensure this through the Mercurial +configuration. + +For this tutorial, we'll add the config at the repository level: + + $ cat << EOF >> .hg/hgrc + > [experimental] >> .hg/hgrc + > enforce-topic=yes >> .hg/hgrc + > EOF + +You can also use `hg config --edit` to update your mercurial configuration. + + +Once enforcement is turned on. New local commit will be denied if no topic is active. + + $ echo sickle >> shopping + $ hg commit -m 'Adding sickle' + abort: no active topic + (set a current topic or use '--config experimental.enforce-topic=no' to commit without a topic) + [255] + +Ok, let's clean this up and delve into multiple topics. + + $ hg revert . + reverting shopping + + Working with Multiple Topics ============================