changeset 5376:7681e3c2237a

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.
author Anton Shestakov <av6@dwimlabs.net>
date Thu, 11 Jun 2020 19:10:56 +0800
parents bed4fc158fc9
children a267a7d3e1c5
files hgext3rd/topic/discovery.py tests/test-topic-push.t
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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:
--- 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]