Mercurial > public > mercurial-scm > evolve
diff hgext3rd/topic/__init__.py @ 3027:b220e2f5ebd5
topic: update the topic-mode hint
The hint is now shorter and reference the documentation. That should provide
more concise output with more details for user who seeks it.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sun, 01 Oct 2017 09:10:48 +0100 |
parents | e9935c2c4672 |
children | c2d1f49ac7e2 |
line wrap: on
line diff
--- 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):