From 184c6d35045676ea3789ba3cc441ecd9e3c7c970 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Mon, 9 Dec 2024 04:35:37 +0000 Subject: [PATCH] Treat ERROR:ABORT unbundle responses as failure to push anything. fix https://github.com/glandium/git-cinnabar/issues/341 --- src/main.rs | 1 + tests/push.t | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index dad124a3..f27efd45 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4861,6 +4861,7 @@ fn remote_helper_push( message.push_str(hint); } error!(target: "root", "{}", message); + pushed = ChangesetHeads::new(); } _ => {} } diff --git a/tests/push.t b/tests/push.t index 0d225c69..ccae8cf5 100755 --- a/tests/push.t +++ b/tests/push.t @@ -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 @@ -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