}
}
-sub nmudiff_email_prepare ($) {
- my ($changes) = @_;
+sub nmudiff_email_prepare ($$$$$) {
+ my ($changes, $cversion, $tagwants, $archive_hash, $dgithead) = @_;
if ($donmudiff eq 'no') {
return;
} elsif ($donmudiff eq 'always') {
my (@header, @psuedoheader, @body);
- my @closes = split /\s+/, $dctrl->{Closes} // '';
+ my @closes = split /\s+/, $changes->{Closes} // '';
if (@closes==1) {
push @header,
To => $closes[0].'@'.(access_cfg 'nmu-bug-old'),
- Subject => "#$closes[0]: Fixed in NMU ($package $version)";
+ Subject => "#$closes[0]: Fixed in NMU ($package $cversion)";
} else {
push @header,
To => (access_cfg 'nmu-bug-new'),
- Subject => "$source: diff for NMU version $version";
+ Subject => "$source: diff for NMU version $cversion";
}
push @body, <<END;
Dear Maintainer,
-I've prepared an NMU for $package, version $version.
+I've prepared an NMU for $package, version $cversion.
END
if (defined $delayed) {
push @psuedoheader, <<END;
Control: tags -1 + patch
-Control: fixed -1 $version
+Control: fixed -1 $cversion
END
push @body, <<END:
I have just uploaded it to DELAYED/$delay.
} else {
push @pseudoheader, <<END foreach @closes;
Control: tags $_ + patch
-Control: fixed $_ $version
+Control: fixed $_ $cversion
END
push @body, <<END:
I have just uploaded it to $csuite.
my $u2= do { local $access_forpush=0; access_giturl; };
push @urls, $u2 unless grep { $_ eq $u2 } @urls;
push @body, " ",$_,"\n" foreach @urls;
+ my $rrref = rrref;
push @body, <<END;
in the remote ref
- refs/dgit/$csuite xxx
+ $rrref
so e.g.
- git fetch $urls[0] xxx
+ git fetch $urls[0] $rrref
git log FETCH_HEAD
-My commits are from $previous
+My commits are from $archive_hash
(previous dgit tip for $csuite)
-to $current ($tagname):
+to $dgithead (tag $tagwants->[0]{Tag}):
END
if (madformat) {
push @body, <<END;
}
my $msg = build MIME::Entity @header,
- 'Boundary' => "dgit-$current",
+ 'Boundary' => "dgit-$dgithead",
'Content-Type' => 'multipart/mixed';
$msg->attach(Charset => 'utf-8',
$msg->attach(Charset => 'utf-8',
Path => output of git diff,
- Description => "NMU diff for $version",
+ Description => "diff for NMU $source $cversion",
Filename => "${package}_${version}_nmu.diff",
- Disposition => 'attachment'
-
+ Disposition => 'attachment');
+ $msg->head->add('X-Mailer', "dgit ($our_version)"); # now there are two
+ print_body
prepend dgit to x-mailer
push @header,
- 'X-Mailer' => "dgit ($our_version)"
+ 'X-Mailer' =>
sub dopush () {
printdebug "actually entering push\n";
# Checks complete, we're going to try and go ahead:
- numdiff_email_prepare($changes);
-
responder_send_file('changes',$changesfile);
responder_send_command("param head $dgithead");
responder_send_command("param csuite $csuite");
".git/dgit/tag");
my @tagobjfns;
+ nmudiff_email_prepare($changes, $cversion, \@tagwants,
+ $archive_hash, $dgithead);
+
supplementary_message(<<'END');
Push failed, while signing the tag.
You can retry the push, after fixing the problem, if you like.