Mercurial > public > mercurial-scm > hg-stable
diff tests/test-ssh.t @ 26829:58f1645f72c3 stable
bundle2: attribute remote failures to remote (issue4788)
Before bundle2, hook output from hook failures was prefixed with
"remote: ". Up to this point with bundle2, the output was converted to
the message to print in an Abort exception. This had 2 implications:
1) It was unclear whether an error message came from the local repo
or the remote
2) The exit code changed from 1 to 255
This patch changes the handling of error:abort bundle2 parts during push
to prefix the error message with "remote: ". This restores the old
behavior.
We still preserve the behavior of raising an Abort during bundle2
application failure. This is a regression from pre-bundle2 because the
exit code changed.
Because we no longer raise an Abort with the remote's message, we needed
to insert a message for the new Abort. So, I invented a new error
message for that. This is another change from pre-bundle2. However, I
like the new error message because it states unambiguously who aborted
the push failed, which I think is important for users so they can decide
what's next.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 24 Oct 2015 00:39:22 +0100 |
parents | 00e75baa810f |
children | dc2016eb326b |
line wrap: on
line diff
--- a/tests/test-ssh.t Sat Oct 24 00:39:26 2015 +0100 +++ b/tests/test-ssh.t Sat Oct 24 00:39:22 2015 +0100 @@ -397,7 +397,8 @@ pushing to ssh://user@dummy/*/remote (glob) searching for changes remote: Permission denied - abort: pretxnopen.hg-ssh hook failed + remote: pretxnopen.hg-ssh hook failed + abort: push failed on remote [255] $ cd .. @@ -527,6 +528,7 @@ remote: hook failure! remote: transaction abort! remote: rollback completed - abort: pretxnchangegroup.fail hook failed + remote: pretxnchangegroup.fail hook failed + abort: push failed on remote [255]