From f8c414c1cfe6b03bb8de76e22d3efa29c377387f Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 28 Dec 2016 14:06:58 +0000 Subject: [PATCH] WIP nmu filled in most stuff need to choose filename and make diff and print encoded message and check git send email configs --- dgit | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/dgit b/dgit index 98499d46..db283ce4 100755 --- a/dgit +++ b/dgit @@ -4025,8 +4025,8 @@ sub sign_changes ($) { } } -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') { @@ -4048,27 +4048,27 @@ sub nmudiff_email_prepare ($) { 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, <[0]{Tag}): END if (madformat) { push @body, < "dgit-$current", + 'Boundary' => "dgit-$dgithead", 'Content-Type' => 'multipart/mixed'; $msg->attach(Charset => 'utf-8', @@ -4130,14 +4131,15 @@ END $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"; @@ -4293,8 +4295,6 @@ END # 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"); @@ -4318,6 +4318,9 @@ END ".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. -- 2.30.2