# HG changeset patch # User Anton Shestakov # Date 1591873856 -28800 # Node ID 7681e3c2237aa60e9fb0e6a0ace3337162b1e57a # Parent bed4fc158fc9fb718af65af2bd31e9f3908e8e56 topic: copy an abort message (new head) from upstream exactly This abort message already exists in core hg, so let's reuse the exact wording and quoting from there. diff -r bed4fc158fc9 -r 7681e3c2237a hgext3rd/topic/discovery.py --- a/hgext3rd/topic/discovery.py Thu Jun 11 18:50:29 2020 +0800 +++ b/hgext3rd/topic/discovery.py Thu Jun 11 19:10:56 2020 +0800 @@ -213,7 +213,7 @@ for branch, oldnb in tr._prepushheads.items(): newnb = finalheads.pop(branch, 0) if oldnb < newnb: - msg = _(b'push create a new head on branch "%s"' % branch) + msg = _(b"push creates a new head on branch '%s'" % branch) raise error.Abort(msg) for branch, newnb in finalheads.items(): if 1 < newnb: diff -r bed4fc158fc9 -r 7681e3c2237a tests/test-topic-push.t --- a/tests/test-topic-push.t Thu Jun 11 18:50:29 2020 +0800 +++ b/tests/test-topic-push.t Thu Jun 11 19:10:56 2020 +0800 @@ -503,5 +503,5 @@ pushing to repoB searching for changes no changes found - abort: push create a new head on branch "default" + abort: push creates a new head on branch 'default' [255]