Skip to content

Commit

Permalink
Treat ERROR:ABORT unbundle responses as failure to push anything.
Browse files Browse the repository at this point in the history
fix #341
  • Loading branch information
Taylor R Campbell committed Dec 14, 2024
1 parent ed39d41 commit 184c6d3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4861,6 +4861,7 @@ fn remote_helper_push(
message.push_str(hint);
}
error!(target: "root", "{}", message);
pushed = ChangesetHeads::new();
}
_ => {}
}
Expand Down
12 changes: 7 additions & 5 deletions tests/push.t
Original file line number Diff line number Diff line change
Expand Up @@ -560,11 +560,13 @@ https://github.com/glandium/git-cinnabar/issues/341
\r (no-eol) (esc)
ERROR Changes on branch 'default' resulted in multiple heads
To hg::.*/push.t/repo (re)
+ 687e015...846552c 846552c6f25c1b46e784f59d8249fb31afac2996 -> branches/default/tip (forced update)
! [remote rejected] 846552c6f25c1b46e784f59d8249fb31afac2996 -> branches/default/tip (nothing changed on remote)
error: failed to push some refs to 'hg::.*/push.t/repo' (re)
[1]
$ rm repo/.hg/hgrc
$ git -C abc-git log --graph --remotes --oneline --no-abbrev-commit
* 846552c6f25c1b46e784f59d8249fb31afac2996 x
* bc90f2819ad12e294b313097b8763d26ca0c08ae b
* 687e015f9f646bb19797d991f2f53087297fbe14 c
* d04f6df4abe2870ceb759263ee6aaa9241c4f93c b
* 8b86a58578d5270969543e287634e3a2f122a338 a
$ hg -R $REPO log -G --template '{node} {branch} {desc}'
o c70941aaa15aa6e5feae28164438f13dc3cd7b8e default c
Expand Down Expand Up @@ -595,8 +597,8 @@ hook:
[1]
$ rm repo/.hg/hgrc
$ git -C abc-git log --graph --remotes --oneline --no-abbrev-commit
* 846552c6f25c1b46e784f59d8249fb31afac2996 x
* bc90f2819ad12e294b313097b8763d26ca0c08ae b
* 687e015f9f646bb19797d991f2f53087297fbe14 c
* d04f6df4abe2870ceb759263ee6aaa9241c4f93c b
* 8b86a58578d5270969543e287634e3a2f122a338 a
$ hg -R $REPO log -G --template '{node} {branch} {desc}'
o c70941aaa15aa6e5feae28164438f13dc3cd7b8e default c
Expand Down

0 comments on commit 184c6d3

Please sign in to comment.