X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=dgit;h=0d7c62d7589a8aa3b1b7bad19d5eef4554792d45;hb=ac981dd92158727ad37f82d4b609c498539b848a;hp=6d9a8045412d349dad14a383efeed4012f1a6a9c;hpb=cd8e216085a98334b6d167b958127ffa8756062a;p=dgit.git diff --git a/dgit b/dgit index 6d9a8045..0d7c62d7 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(4 5); # 5 drops tag format specification +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 @@ -977,9 +977,8 @@ sub notpushing () { parseopts_late_defaults(); } -sub determine_whether_split_brain () { - my ($format,) = get_source_format(); - +sub determine_whether_split_brain ($) { + my ($format) = @_; { local $access_forpush; default_from_access_cfg(\$splitview_mode, 'split-view', 'auto', @@ -997,8 +996,6 @@ sub determine_whether_split_brain () { $do_split_brain = 1; } $do_split_brain //= 0; - - return ($format); } sub supplementary_message ($) { @@ -4366,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) = @_; @@ -4382,23 +4378,33 @@ tag $tag tagger $authline END - if ($tw->{View} eq 'dgit') { - print TO f_ <{View} eq 'dgit') { + print TO sprintf <{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; printdebug "[[ $keyword @localpaths\n"; @@ -5202,8 +5221,6 @@ sub i_resp_want ($) { print RI "files-end\n" or confess "$!"; } -our ($i_clogp, $i_version, $i_dscfn, $i_changesfn, @i_buildinfos); - sub i_localname_parsed_changelog { return "remote-changelog.822"; } @@ -5271,7 +5288,7 @@ sub i_want_signed_tag { die unless $i_param{'csuite'} =~ m/^$suite_re$/; $csuite = $&; - push_parse_dsc $i_dscfn, 'remote dsc', $i_version; + defined $dsc or badproto \*RO, "dsc (before parsed-changelog)"; my @tagwants = push_tagwants $i_version, $head, $maintview, "tag"; @@ -6564,17 +6581,21 @@ 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); } sub build_or_push_prep_modes () { - my ($format,) = determine_whether_split_brain(); + my ($format) = get_source_format(); + determine_whether_split_brain($format); fail __ "dgit: --include-dirty is not supported with split view". " (including with view-splitting quilt modes)"