diff tests/test-topic.t @ 2733:adfbb984ebbb

topics: check for topic on commit before a user enters message We have a enforce-topic cofig which can forbid user to commit without a topic on it. We used to check topic on a commit after the user enters message, but we should fail early.
author Pulkit Goyal <7895pulkit@gmail.com>
date Fri, 14 Jul 2017 00:54:48 +0530
parents d39942773163
children 9fd6c8efda5b
line wrap: on
line diff
--- a/tests/test-topic.t	Fri Jul 14 03:14:27 2017 +0200
+++ b/tests/test-topic.t	Fri Jul 14 00:54:48 2017 +0530
@@ -849,6 +849,13 @@
   abort: no active topic
   (set a current topic or use '--config experimental.enforce-topic=no' 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)
+  [255]
   $ hg ci -m "added a" --config experimental.enforce-topic=no
   $ hg log
   changeset:   0:a154386e50d1