X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=dgit;h=6bb1f488d6a01c8eee5cf130863dd7a8027f1faa;hb=6a31b9ee6cf62f1d78c307213c88064d4efb8d24;hp=43d2286b95de11f8ea66dfa100bf4b2c7d65edf4;hpb=5986b06eef2f0132f9eda164939e74558301988b;p=dgit.git diff --git a/dgit b/dgit index 43d2286b..6bb1f488 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; @@ -104,7 +104,6 @@ our %forceopts = map { $_=>0 } our %format_ok = map { $_=>1 } ("1.0","3.0 (native)","3.0 (quilt)"); -our $suite_re = '[-+.0-9a-z]+'; our $cleanmode_re = qr{(?: dpkg-source (?: -d )? (?: ,no-check | ,all-check )? | (?: git | git-ff ) (?: ,always )? | check (?: ,ignores )? @@ -473,6 +472,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 @@ -4363,7 +4363,6 @@ sub push_mktags ($$ $$ $) { # We make the git tag by hand because (a) that makes it easier # to control the "tagger" (b) we can do remote signing my $authline = clogp_authline $clogp; - my @dtxinfo = @deliberatelies; my $mktag = sub { my ($tw) = @_; @@ -4379,20 +4378,28 @@ tag $tag tagger $authline END + + my @dtxinfo = @deliberatelies; + unshift @dtxinfo, "--quilt=$quilt_mode" if madformat($format); + unshift @dtxinfo, do_split_brain() ? "split" : "no-split" + # rpush protocol 5 and earlier don't tell us + unless $we_are_initiator && $protovsn < 6; + my $dtxinfo = join(" ", "",@dtxinfo); + my $tag_metadata = <{View} eq 'dgit') { print TO f_ <{View} eq 'maint') { print TO f_ <= 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; @@ -6563,12 +6578,15 @@ sub WANTSRC_BUILDER () { 02; } # caller should run dpkg-buildpackage sub build_or_push_prep_early () { our $build_or_push_prep_early_done //= 0; return if $build_or_push_prep_early_done++; - badusage f_ "-p is not allowed with dgit %s", $subcommand - if defined $package; my $clogp = parsechangelog(); $isuite = getfield $clogp, 'Distribution'; - $package = getfield $clogp, 'Source'; + my $gotpackage = getfield $clogp, 'Source'; $version = getfield $clogp, 'Version'; + $package //= $gotpackage; + if ($package ne $gotpackage) { + fail f_ "-p specified package %s, but changelog says %s", + $package, $gotpackage; + } $dscfn = dscfn($version); }