diff --git a/mercurial/discovery.py b/mercurial/discovery.py --- a/mercurial/discovery.py +++ b/mercurial/discovery.py @@ -399,12 +399,12 @@ closedbranches.add(tag) closedbranches = closedbranches & set(newbranches) if closedbranches: - errmsg = _(b"push creates new remote branches: %s (%d closed)!") % ( + errmsg = _(b"push creates new remote branches: %s (%d closed)") % ( branchnames, len(closedbranches), ) else: - errmsg = _(b"push creates new remote branches: %s!") % branchnames + errmsg = _(b"push creates new remote branches: %s") % branchnames hint = _(b"use 'hg push --new-branch' to create new remote branches") raise error.Abort(errmsg, hint=hint) @@ -469,15 +469,15 @@ if errormsg is None: if branch not in (b'default', None): errormsg = _( - b"push creates new remote head %s on branch '%s'!" + b"push creates new remote head %s on branch '%s'" ) % (short(dhs[0]), branch,) elif repo[dhs[0]].bookmarks(): errormsg = _( b"push creates new remote head %s " - b"with bookmark '%s'!" + b"with bookmark '%s'" ) % (short(dhs[0]), repo[dhs[0]].bookmarks()[0]) else: - errormsg = _(b"push creates new remote head %s!") % short( + errormsg = _(b"push creates new remote head %s") % short( dhs[0] ) if unsyncedheads: diff --git a/tests/test-bookflow.t b/tests/test-bookflow.t --- a/tests/test-bookflow.t +++ b/tests/test-bookflow.t @@ -140,7 +140,7 @@ $ cd ../b $ # make sure we cannot push after bookmarks diverged $ hg push -B X | grep abort - abort: push creates new remote head * with bookmark 'X'! (glob) + abort: push creates new remote head * with bookmark 'X' (glob) (pull and merge or see 'hg help push' for details about pushing new heads) [1] $ hg pull -u | grep divergent diff --git a/tests/test-bookmarks-pushpull.t b/tests/test-bookmarks-pushpull.t --- a/tests/test-bookmarks-pushpull.t +++ b/tests/test-bookmarks-pushpull.t @@ -740,7 +740,7 @@ $ hg push http://localhost:$HGPORT2/ pushing to http://localhost:$HGPORT2/ searching for changes - abort: push creates new remote head c922c0139ca0 with bookmark 'Y'! + abort: push creates new remote head c922c0139ca0 with bookmark 'Y' (merge or see 'hg help push' for details about pushing new heads) [255] $ hg -R ../a book @@ -757,7 +757,7 @@ $ hg push http://localhost:$HGPORT2/ pushing to http://localhost:$HGPORT2/ searching for changes - abort: push creates new remote head c922c0139ca0 with bookmark 'Y'! + abort: push creates new remote head c922c0139ca0 with bookmark 'Y' (merge or see 'hg help push' for details about pushing new heads) [255] $ hg -R ../a book @@ -1053,7 +1053,7 @@ pushing to $TESTTMP/addmarks searching for changes remote has heads on branch 'default' that are not known locally: a2a606d9ff1b - abort: push creates new remote head 54694f811df9 with bookmark 'X'! + abort: push creates new remote head 54694f811df9 with bookmark 'X' (pull and merge or see 'hg help push' for details about pushing new heads) [255] $ cd ../addmarks diff --git a/tests/test-exchange-obsmarkers-case-A3.t b/tests/test-exchange-obsmarkers-case-A3.t --- a/tests/test-exchange-obsmarkers-case-A3.t +++ b/tests/test-exchange-obsmarkers-case-A3.t @@ -199,7 +199,7 @@ $ hg push -R main -r 'desc(A1)' pushdest pushing to pushdest searching for changes - abort: push creates new remote head e5ea8f9c7314! + abort: push creates new remote head e5ea8f9c7314 (merge or see 'hg help push' for details about pushing new heads) [255] $ cd .. diff --git a/tests/test-obsolete-checkheads.t b/tests/test-obsolete-checkheads.t --- a/tests/test-obsolete-checkheads.t +++ b/tests/test-obsolete-checkheads.t @@ -95,7 +95,7 @@ $ hg push pushing to $TESTTMP/remote searching for changes - abort: push creates new remote head 71e3228bffe1! + abort: push creates new remote head 71e3228bffe1 (merge or see 'hg help push' for details about pushing new heads) [255] @@ -155,7 +155,7 @@ $ hg push -r 'desc("other")' pushing to $TESTTMP/remote searching for changes - abort: push creates new remote head d7d41ccbd4de! + abort: push creates new remote head d7d41ccbd4de (merge or see 'hg help push' for details about pushing new heads) [255] @@ -267,7 +267,7 @@ pushing to $TESTTMP/remote searching for changes remote has heads on branch 'default' that are not known locally: c70b08862e08 - abort: push creates new remote head 71e3228bffe1! + abort: push creates new remote head 71e3228bffe1 (pull and merge or see 'hg help push' for details about pushing new heads) [255] @@ -317,6 +317,6 @@ $ hg push pushing to $TESTTMP/remote searching for changes - abort: push creates new remote head 350a93b716be! + abort: push creates new remote head 350a93b716be (merge or see 'hg help push' for details about pushing new heads) [255] diff --git a/tests/test-phases-exchange.t b/tests/test-phases-exchange.t --- a/tests/test-phases-exchange.t +++ b/tests/test-phases-exchange.t @@ -1015,7 +1015,7 @@ $ hg push -r 435b5d83910c ../mu pushing to ../mu searching for changes - abort: push creates new remote head 435b5d83910c! + abort: push creates new remote head 435b5d83910c (merge or see 'hg help push' for details about pushing new heads) [255] $ hg push -fr 435b5d83910c ../mu # because the push will create new visible head diff --git a/tests/test-push-checkheads-multibranches-E3.t b/tests/test-push-checkheads-multibranches-E3.t --- a/tests/test-push-checkheads-multibranches-E3.t +++ b/tests/test-push-checkheads-multibranches-E3.t @@ -87,7 +87,7 @@ $ hg push -r 'desc("C1")' pushing to $TESTTMP/E1/server searching for changes - abort: push creates new remote head dc44c53142f0! + abort: push creates new remote head dc44c53142f0 (merge or see 'hg help push' for details about pushing new heads) [255] diff --git a/tests/test-push-checkheads-partial-C1.t b/tests/test-push-checkheads-partial-C1.t --- a/tests/test-push-checkheads-partial-C1.t +++ b/tests/test-push-checkheads-partial-C1.t @@ -78,7 +78,7 @@ $ hg push pushing to $TESTTMP/C1/server searching for changes - abort: push creates new remote head 25c56d33e4c4! + abort: push creates new remote head 25c56d33e4c4 (merge or see 'hg help push' for details about pushing new heads) [255] diff --git a/tests/test-push-checkheads-partial-C2.t b/tests/test-push-checkheads-partial-C2.t --- a/tests/test-push-checkheads-partial-C2.t +++ b/tests/test-push-checkheads-partial-C2.t @@ -79,7 +79,7 @@ $ hg push --rev 'desc(A1)' pushing to $TESTTMP/C2/server searching for changes - abort: push creates new remote head f6082bc4ffef! + abort: push creates new remote head f6082bc4ffef (merge or see 'hg help push' for details about pushing new heads) [255] diff --git a/tests/test-push-checkheads-partial-C3.t b/tests/test-push-checkheads-partial-C3.t --- a/tests/test-push-checkheads-partial-C3.t +++ b/tests/test-push-checkheads-partial-C3.t @@ -78,7 +78,7 @@ $ hg push pushing to $TESTTMP/C3/server searching for changes - abort: push creates new remote head 0f88766e02d6! + abort: push creates new remote head 0f88766e02d6 (merge or see 'hg help push' for details about pushing new heads) [255] diff --git a/tests/test-push-checkheads-partial-C4.t b/tests/test-push-checkheads-partial-C4.t --- a/tests/test-push-checkheads-partial-C4.t +++ b/tests/test-push-checkheads-partial-C4.t @@ -79,7 +79,7 @@ $ hg push --rev 'desc(C0)' pushing to $TESTTMP/C4/server searching for changes - abort: push creates new remote head 0f88766e02d6! + abort: push creates new remote head 0f88766e02d6 (merge or see 'hg help push' for details about pushing new heads) [255] diff --git a/tests/test-push-checkheads-unpushed-D1.t b/tests/test-push-checkheads-unpushed-D1.t --- a/tests/test-push-checkheads-unpushed-D1.t +++ b/tests/test-push-checkheads-unpushed-D1.t @@ -71,7 +71,7 @@ $ hg push -r 'desc(B0)' pushing to $TESTTMP/D1/server searching for changes - abort: push creates new remote head 74ff5441d343! + abort: push creates new remote head 74ff5441d343 (merge or see 'hg help push' for details about pushing new heads) [255] diff --git a/tests/test-push-checkheads-unpushed-D2.t b/tests/test-push-checkheads-unpushed-D2.t --- a/tests/test-push-checkheads-unpushed-D2.t +++ b/tests/test-push-checkheads-unpushed-D2.t @@ -92,7 +92,7 @@ $ hg push --rev 'desc(C0)' pushing to $TESTTMP/D2/server searching for changes - abort: push creates new remote head 0f88766e02d6! + abort: push creates new remote head 0f88766e02d6 (merge or see 'hg help push' for details about pushing new heads) [255] diff --git a/tests/test-push-checkheads-unpushed-D3.t b/tests/test-push-checkheads-unpushed-D3.t --- a/tests/test-push-checkheads-unpushed-D3.t +++ b/tests/test-push-checkheads-unpushed-D3.t @@ -91,13 +91,13 @@ $ hg push --rev 'desc(A1)' pushing to $TESTTMP/D3/server searching for changes - abort: push creates new remote head f6082bc4ffef! + abort: push creates new remote head f6082bc4ffef (merge or see 'hg help push' for details about pushing new heads) [255] $ hg push --rev 'desc(B1)' pushing to $TESTTMP/D3/server searching for changes - abort: push creates new remote head 25c56d33e4c4! + abort: push creates new remote head 25c56d33e4c4 (merge or see 'hg help push' for details about pushing new heads) [255] @@ -109,7 +109,7 @@ $ hg push pushing to $TESTTMP/D3/server searching for changes - abort: push creates new remote head 25c56d33e4c4! + abort: push creates new remote head 25c56d33e4c4 (merge or see 'hg help push' for details about pushing new heads) [255] diff --git a/tests/test-push-checkheads-unpushed-D4.t b/tests/test-push-checkheads-unpushed-D4.t --- a/tests/test-push-checkheads-unpushed-D4.t +++ b/tests/test-push-checkheads-unpushed-D4.t @@ -109,7 +109,7 @@ $ hg push --rev 'desc(A1)' pushing to $TESTTMP/D4/server searching for changes - abort: push creates new remote head f6082bc4ffef! + abort: push creates new remote head f6082bc4ffef (merge or see 'hg help push' for details about pushing new heads) [255] diff --git a/tests/test-push-checkheads-unpushed-D5.t b/tests/test-push-checkheads-unpushed-D5.t --- a/tests/test-push-checkheads-unpushed-D5.t +++ b/tests/test-push-checkheads-unpushed-D5.t @@ -98,7 +98,7 @@ $ hg push --rev 'desc(B1)' pushing to $TESTTMP/D5/server searching for changes - abort: push creates new remote head 25c56d33e4c4! + abort: push creates new remote head 25c56d33e4c4 (merge or see 'hg help push' for details about pushing new heads) [255] $ hg push --rev 'desc(A1)' diff --git a/tests/test-push-checkheads-unpushed-D6.t b/tests/test-push-checkheads-unpushed-D6.t --- a/tests/test-push-checkheads-unpushed-D6.t +++ b/tests/test-push-checkheads-unpushed-D6.t @@ -79,7 +79,7 @@ $ hg push --rev 'desc(C0)' pushing to $TESTTMP/D6/server searching for changes - abort: push creates new remote head 0f88766e02d6! + abort: push creates new remote head 0f88766e02d6 (merge or see 'hg help push' for details about pushing new heads) [255] diff --git a/tests/test-push-warn.t b/tests/test-push-warn.t --- a/tests/test-push-warn.t +++ b/tests/test-push-warn.t @@ -31,7 +31,7 @@ pushing to ../a searching for changes remote has heads on branch 'default' that are not known locally: 1c9246a22a0a - abort: push creates new remote head 1e108cc5548c! + abort: push creates new remote head 1e108cc5548c (pull and merge or see 'hg help push' for details about pushing new heads) [255] @@ -49,7 +49,7 @@ remote has heads on branch 'default' that are not known locally: 1c9246a22a0a new remote heads on branch 'default': 1e108cc5548c - abort: push creates new remote head 1e108cc5548c! + abort: push creates new remote head 1e108cc5548c (pull and merge or see 'hg help push' for details about pushing new heads) [255] @@ -66,7 +66,7 @@ $ hg push ../a pushing to ../a searching for changes - abort: push creates new remote head 1e108cc5548c! + abort: push creates new remote head 1e108cc5548c (merge or see 'hg help push' for details about pushing new heads) [255] @@ -119,7 +119,7 @@ $ hg push ../c pushing to ../c searching for changes - abort: push creates new remote head 6346d66eb9f5! + abort: push creates new remote head 6346d66eb9f5 (merge or see 'hg help push' for details about pushing new heads) [255] @@ -132,7 +132,7 @@ $ hg push -r 3 ../c pushing to ../c searching for changes - abort: push creates new remote head a5dda829a167! + abort: push creates new remote head a5dda829a167 (merge or see 'hg help push' for details about pushing new heads) [255] @@ -142,7 +142,7 @@ new remote heads on branch 'default': a5dda829a167 ee8fbc7a0295 - abort: push creates new remote head a5dda829a167! + abort: push creates new remote head a5dda829a167 (merge or see 'hg help push' for details about pushing new heads) [255] @@ -232,14 +232,14 @@ $ hg push ../f pushing to ../f searching for changes - abort: push creates new remote branches: c! + abort: push creates new remote branches: c (use 'hg push --new-branch' to create new remote branches) [255] $ hg push -r 4 -r 5 ../f pushing to ../f searching for changes - abort: push creates new remote branches: c! + abort: push creates new remote branches: c (use 'hg push --new-branch' to create new remote branches) [255] @@ -253,14 +253,14 @@ $ hg push ../f pushing to ../f searching for changes - abort: push creates new remote branches: c, d! + abort: push creates new remote branches: c, d (use 'hg push --new-branch' to create new remote branches) [255] $ hg push -r 4 -r 6 ../f pushing to ../f searching for changes - abort: push creates new remote branches: c, d! + abort: push creates new remote branches: c, d (use 'hg push --new-branch' to create new remote branches) [255] @@ -276,7 +276,7 @@ $ hg push -r 4 -r 7 ../f pushing to ../f searching for changes - abort: push creates new remote head 0b715ef6ff8f on branch 'a'! + abort: push creates new remote head 0b715ef6ff8f on branch 'a' (merge or see 'hg help push' for details about pushing new heads) [255] @@ -353,7 +353,7 @@ $ hg push -r 12 -r 13 ../f pushing to ../f searching for changes - abort: push creates new remote branches: e! + abort: push creates new remote branches: e (use 'hg push --new-branch' to create new remote branches) [255] @@ -425,7 +425,7 @@ pushing to h searching for changes remote has heads on branch 'default' that are not known locally: 534543e22c29 764f8ec07b96 afe7cc7679f5 ce4212fc8847 - abort: push creates new remote head 97bd0c84d346! + abort: push creates new remote head 97bd0c84d346 (pull and merge or see 'hg help push' for details about pushing new heads) [255] $ hg -R h up -q 0; echo x > h/b; hg -R h ci -qAmx @@ -433,7 +433,7 @@ pushing to h searching for changes remote has heads on branch 'default' that are not known locally: 18ddb72c4590 534543e22c29 764f8ec07b96 afe7cc7679f5 and 1 others - abort: push creates new remote head 97bd0c84d346! + abort: push creates new remote head 97bd0c84d346 (pull and merge or see 'hg help push' for details about pushing new heads) [255] $ hg -R i push h -v @@ -442,7 +442,7 @@ remote has heads on branch 'default' that are not known locally: 18ddb72c4590 534543e22c29 764f8ec07b96 afe7cc7679f5 ce4212fc8847 new remote heads on branch 'default': 97bd0c84d346 - abort: push creates new remote head 97bd0c84d346! + abort: push creates new remote head 97bd0c84d346 (pull and merge or see 'hg help push' for details about pushing new heads) [255] @@ -477,7 +477,7 @@ $ hg -R k push -r a j pushing to j searching for changes - abort: push creates new remote branches: b! + abort: push creates new remote branches: b (use 'hg push --new-branch' to create new remote branches) [255] @@ -513,7 +513,7 @@ $ hg push ../l -b b pushing to ../l searching for changes - abort: push creates new remote head 451211cc22b0 on branch 'a'! + abort: push creates new remote head 451211cc22b0 on branch 'a' (merge or see 'hg help push' for details about pushing new heads) [255] @@ -763,14 +763,14 @@ $ hg push inner pushing to inner searching for changes - abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'! + abort: push creates new remote head 7d0f4fb6cf04 on branch 'A' (merge or see 'hg help push' for details about pushing new heads) [255] $ hg push inner -r4 -r5 pushing to inner searching for changes - abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'! + abort: push creates new remote head 7d0f4fb6cf04 on branch 'A' (merge or see 'hg help push' for details about pushing new heads) [255] @@ -786,7 +786,7 @@ pushing to inner searching for changes running fail-push hook - abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'! + abort: push creates new remote head 7d0f4fb6cf04 on branch 'A' (merge or see 'hg help push' for details about pushing new heads) [255] @@ -815,7 +815,7 @@ $ hg push ../x pushing to ../x searching for changes - abort: push creates new remote branches: foo (1 closed)! + abort: push creates new remote branches: foo (1 closed) (use 'hg push --new-branch' to create new remote branches) [255] @@ -828,7 +828,7 @@ $ hg push ../x pushing to ../x searching for changes - abort: push creates new remote branches: bar, foo (2 closed)! + abort: push creates new remote branches: bar, foo (2 closed) (use 'hg push --new-branch' to create new remote branches) [255] @@ -840,7 +840,7 @@ $ hg push ../x pushing to ../x searching for changes - abort: push creates new remote branches: bar, bar1, foo (2 closed)! + abort: push creates new remote branches: bar, bar1, foo (2 closed) (use 'hg push --new-branch' to create new remote branches) [255] diff --git a/tests/test-push.t b/tests/test-push.t --- a/tests/test-push.t +++ b/tests/test-push.t @@ -385,7 +385,7 @@ $ hg push -b default pushing to $TESTTMP/test-require-revs-dest searching for changes - abort: push creates new remote head [0-9a-f]+! (re) + abort: push creates new remote head [0-9a-f]+ (re) (merge or see 'hg help push' for details about pushing new heads) [255] (demonstrate that even though we don't have anything to exchange, we're still diff --git a/tests/test-subrepo.t b/tests/test-subrepo.t --- a/tests/test-subrepo.t +++ b/tests/test-subrepo.t @@ -571,7 +571,7 @@ no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss pushing subrepo s to $TESTTMP/t/s searching for changes - abort: push creates new remote head 12a213df6fa9! (in subrepository "s") + abort: push creates new remote head 12a213df6fa9 (in subrepository "s") (merge or see 'hg help push' for details about pushing new heads) [255] $ hg push -f @@ -1013,7 +1013,7 @@ created new head $ hg -R repo2 ci -m3 $ hg -q -R repo2 push - abort: push creates new remote head cc505f09a8b2! (in subrepository "s") + abort: push creates new remote head cc505f09a8b2 (in subrepository "s") (merge or see 'hg help push' for details about pushing new heads) [255] $ hg -R repo update diff --git a/tests/test-treediscovery-legacy.t b/tests/test-treediscovery-legacy.t --- a/tests/test-treediscovery-legacy.t +++ b/tests/test-treediscovery-legacy.t @@ -285,7 +285,7 @@ $ hg push $remote pushing to http://localhost:$HGPORT/ searching for changes - abort: push creates new remote branches: both, name1! + abort: push creates new remote branches: both, name1 (use 'hg push --new-branch' to create new remote branches) [255] $ hg push $remote --new-branch diff --git a/tests/test-treediscovery.t b/tests/test-treediscovery.t --- a/tests/test-treediscovery.t +++ b/tests/test-treediscovery.t @@ -269,7 +269,7 @@ $ hg push $remote pushing to http://localhost:$HGPORT/ searching for changes - abort: push creates new remote branches: both, name1! + abort: push creates new remote branches: both, name1 (use 'hg push --new-branch' to create new remote branches) [255] $ hg push $remote --new-branch