From 2193c15cf92d4765da004a310bf684b61718eedf Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 5 Jul 2019 16:11:43 +0100 Subject: dgit: rpush protocol version 6: Include splitbrain param And, in the push responder, check that we agree. No overall functional change. Signed-off-by: Ian Jackson --- dgit | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'dgit') diff --git a/dgit b/dgit index 43d2286..e9b2cd5 100755 --- a/dgit +++ b/dgit @@ -53,7 +53,7 @@ use Debian::Dgit; our $our_version = 'UNRELEASED'; ###substituted### our $absurdity = undef; ###substituted### -our @rpushprotovsn_support = qw(5 4); # Reverse order! +our @rpushprotovsn_support = qw(6 5 4); # Reverse order! our $protovsn; our $cmd; @@ -473,6 +473,7 @@ sub branch_is_gdr ($) { # > param head DGIT-VIEW-HEAD # > param csuite SUITE # > param tagformat new # $protovsn == 4 +# > param splitbrain 0|1 # $protovsn >= 6 # > param maint-view MAINT-VIEW-HEAD # # > param buildinfo-filename P_V_X.buildinfo # zero or more times @@ -4681,6 +4682,7 @@ ENDT responder_send_command("param csuite $csuite"); responder_send_command("param isuite $isuite"); responder_send_command("param tagformat new"); # needed in $protovsn==4 + responder_send_command("param splitbrain $do_split_brain"); if (defined $maintviewhead) { responder_send_command("param maint-view $maintviewhead"); } @@ -5193,6 +5195,13 @@ sub i_resp_want ($) { pushing(); rpush_handle_protovsn_bothends(); push_parse_dsc $i_dscfn, 'remote dsc', $i_version; + if ($protovsn >= 6) { + determine_whether_split_brain getfield $dsc, 'Format'; + $do_split_brain eq ($i_param{'splitbrain'} // '') + or badproto \*RO, + "split brain mismatch, $do_split_brain != $i_param{'split_brain'}"; + printdebug "rpush split brain $do_split_brain\n"; + } } my @localpaths = i_method "i_want", $keyword; -- cgit v1.2.3