# HG changeset patch # User Boris Feld # Date 1506807772 -3600 # Node ID 5f4c42d4f2e8ab1b0240c86ce74538995ef1c954 # Parent 361d83261d7a7fd347b47e602a50169bdc0a1df8 test: update tests to use topic-mode enforce diff -r 361d83261d7a -r 5f4c42d4f2e8 hgext3rd/topic/__init__.py --- a/hgext3rd/topic/__init__.py Sat Sep 30 22:24:24 2017 +0100 +++ b/hgext3rd/topic/__init__.py Sat Sep 30 22:42:52 2017 +0100 @@ -898,7 +898,7 @@ elif not repo.currenttopic and topicmode == "enforce": msg = _("no active topic") hint = _("set a current topic or use '--config " + - "experimental.enforce-topic=no' to commit without a topic") + "experimental.topic-mode=off' to commit without a topic") raise error.Abort(msg, hint=hint) return orig(ui, repo, *args, **opts) diff -r 361d83261d7a -r 5f4c42d4f2e8 tests/test-topic-tutorial.t --- a/tests/test-topic-tutorial.t Sat Sep 30 22:24:24 2017 +0100 +++ b/tests/test-topic-tutorial.t Sat Sep 30 22:42:52 2017 +0100 @@ -703,7 +703,7 @@ $ cat << EOF >> .hg/hgrc > [experimental] - > enforce-topic = yes + > topic-mode = enforce > EOF You can also use `hg config --edit` to update your mercurial configuration. @@ -714,7 +714,7 @@ $ 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) + (set a current topic or use '--config experimental.topic-mode=off' to commit without a topic) [255] Ok, let's clean this up and delve into multiple topics. diff -r 361d83261d7a -r 5f4c42d4f2e8 tests/test-topic.t --- a/tests/test-topic.t Sat Sep 30 22:24:24 2017 +0100 +++ b/tests/test-topic.t Sat Sep 30 22:42:52 2017 +0100 @@ -920,22 +920,22 @@ > EOF $ cat <> $HGRCPATH > [experimental] - > enforce-topic = yes + > topic-mode = enforce > EOF $ touch a b c d $ hg add a $ hg ci -m "Added a" abort: no active topic - (set a current topic or use '--config experimental.enforce-topic=no' to commit without a topic) + (set a current topic or use '--config experimental.topic-mode=off' to commit without a topic) [255] (same test, checking we abort before the editor) $ EDITOR=cat hg ci -m "Added a" --edit abort: no active topic - (set a current topic or use '--config experimental.enforce-topic=no' to commit without a topic) + (set a current topic or use '--config experimental.topic-mode=off' to commit without a topic) [255] - $ hg ci -m "added a" --config experimental.enforce-topic=no + $ hg ci -m "added a" --config experimental.topic-mode=off $ hg log changeset: 0:a154386e50d1 tag: tip