comparison tests/test-topic-tutorial.t @ 2968:946b1baa8c38

topics/tuto: activate the `enforce-topic` option This really help users to stick within topics.
author Aurélien Campéas
date Thu, 21 Sep 2017 15:09:14 +0200
parents c62b3776fec3
children 3d39b8867b29
comparison
equal deleted inserted replaced
2967:c62b3776fec3 2968:946b1baa8c38
680 0 files updated, 0 files merged, 0 files removed, 0 files unresolved 680 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
681 681
682 From there, the topic has vanished. 682 From there, the topic has vanished.
683 683
684 $ hg topic 684 $ hg topic
685
686
687 Keep working within topics
688 ==========================
689
690 Making sure all your new local commit are made within a topic will help your
691 organise your work. It is possible to ensure this through the Mercurial
692 configuration.
693
694 For this tutorial, we'll add the config at the repository level:
695
696 $ cat << EOF >> .hg/hgrc
697 > [experimental] >> .hg/hgrc
698 > enforce-topic=yes >> .hg/hgrc
699 > EOF
700
701 You can also use `hg config --edit` to update your mercurial configuration.
702
703
704 Once enforcement is turned on. New local commit will be denied if no topic is active.
705
706 $ echo sickle >> shopping
707 $ hg commit -m 'Adding sickle'
708 abort: no active topic
709 (set a current topic or use '--config experimental.enforce-topic=no' to commit without a topic)
710 [255]
711
712 Ok, let's clean this up and delve into multiple topics.
713
714 $ hg revert .
715 reverting shopping
685 716
686 717
687 Working with Multiple Topics 718 Working with Multiple Topics
688 ============================ 719 ============================
689 720