X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=dgit;h=54c38c24f534c668b3ecf6e3fccbd62d70cb5c48;hb=302a82c5e9e200fe93befefbdeb2b9ccfac00239;hp=9df8294adbf8a5eea0db4c44c4dba7828a109aca;hpb=9831dc86c3e40fc6fc1ea0f8df0f1887bc8284d5;p=dgit.git diff --git a/dgit b/dgit index 9df8294a..54c38c24 100755 --- a/dgit +++ b/dgit @@ -142,7 +142,6 @@ our %opts_cfg_insertpos = map { scalar @{ $opts_opt_map{$_} } } keys %opts_opt_map; -sub finalise_opts_opts(); sub parseopts_late_defaults(); our $keyid; @@ -792,11 +791,11 @@ sub pushing () { Push failed, before we got started. You can retry the push, after fixing the problem, if you like. END - finalise_opts_opts(); + parseopts_late_defaults(); } sub notpushing () { - finalise_opts_opts(); + parseopts_late_defaults(); } sub supplementary_message ($) { @@ -3724,7 +3723,11 @@ sub push_mktags ($$ $$ $) { die unless $tagwants->[0]{View} eq 'dgit'; - $dsc->{$ourdscfield[0]} = $tagwants->[0]{Objid}; + my $declaredistro = access_nomdistro(); + my $reader_giturl = do { local $access_forpush=0; access_giturl(); }; + $dsc->{$ourdscfield[0]} = join " ", + $tagwants->[0]{Objid}, $declaredistro, $tagwants->[0]{Tag}, + $reader_giturl; $dsc->save("$dscfn.tmp") or die $!; my $changes = parsecontrol($changesfile,$changesfilewhat); @@ -3741,7 +3744,6 @@ sub push_mktags ($$ $$ $) { # to control the "tagger" (b) we can do remote signing my $authline = clogp_authline $clogp; my $delibs = join(" ", "",@deliberatelies); - my $declaredistro = access_nomdistro(); my $mktag = sub { my ($tw) = @_; @@ -4132,7 +4134,6 @@ sub branchsuite () { } sub fetchpullargs () { - notpushing(); if (!defined $package) { my $sourcep = parsecontrol('debian/control','debian/control'); $package = getfield $sourcep, 'Source'; @@ -4148,6 +4149,7 @@ sub fetchpullargs () { } else { badusage "incorrect arguments to dgit fetch or dgit pull"; } + notpushing(); } sub cmd_fetch { @@ -6265,7 +6267,7 @@ END } -sub finalise_opts_opts () { +sub parseopts_late_defaults () { foreach my $k (keys %opts_opt_map) { my $om = $opts_opt_map{$k}; @@ -6293,10 +6295,6 @@ sub finalise_opts_opts () { } } - parseopts_late_defaults(); -} - -sub parseopts_late_defaults () { if (!defined $rmchanges) { local $access_forpush; $rmchanges = access_cfg_bool(0, 'rm-old-changes');