hgext3rd/topic/__init__.py
changeset 3027 b220e2f5ebd5
parent 3026 e9935c2c4672
child 3028 c2d1f49ac7e2
--- a/hgext3rd/topic/__init__.py	Sun Oct 01 09:05:42 2017 +0100
+++ b/hgext3rd/topic/__init__.py	Sun Oct 01 09:10:48 2017 +0100
@@ -925,17 +925,18 @@
             mayabort = True
             maywarn = False
 
+        hint = _("see 'hg help -e topic.topic-mode' for details")
         if opts.get('topic'):
             t = opts['topic']
             with repo.vfs.open('topic', 'w') as f:
                 f.write(t)
         elif notopic and mayabort:
             msg = _("no active topic")
-            hint = _("set a current topic or use '--config " +
-                     "experimental.topic-mode=off' to commit without a topic")
             raise error.Abort(msg, hint=hint)
         elif notopic and maywarn:
             ui.warn(_("warning: new draft commit without topic\n"))
+            if not ui.quiet:
+                ui.warn(("(%s)") % hint)
         return orig(ui, repo, *args, **opts)
 
 def committextwrap(orig, repo, ctx, subs, extramsg):