]> git.donarmstrong.com Git - debbugs.git/commitdiff
Include references from the original bug in replies
authorDon Armstrong <don@donarmstrong.com>
Sat, 5 Aug 2017 20:39:00 +0000 (13:39 -0700)
committerDon Armstrong <don@donarmstrong.com>
Sat, 5 Aug 2017 20:39:00 +0000 (13:39 -0700)
debian/changelog
scripts/process

index 41458cf46c0b4b938be0908167e1b7d2c2f0cc30..23a313abb14a9c087cb8c7fee32b839f0a555399 100644 (file)
@@ -57,6 +57,8 @@ debbugs (2.6.0~exp1) UNRELEASED; urgency=low
     path if the sendmail default is wrong. (Closes: #719205)
   * Fix links to merged and blocked bugs. (Closes: #539691)
   * Strip out Mail-Followup-To: (Closes: #798092)
+  * Include references from the original message in replies. (Closes: #485697)
+    Thanks to Julien Cristau
 
   [ Niels Thykier ]
   * quitcgi() now returns 400/500 status codes instead of 200 (Closes: #584922)
index 38e4f90c8c1a1e326b5530d8bed341ba29f9a109..d7eec80badbaa781fcc27df62c3cd0a85ec1192d 100755 (executable)
@@ -180,7 +180,9 @@ for my $hdr (@headerlines) {
     $_ = $hdr;
     s/\n\s/ /g;
     finish() if m/^x-loop: (\S+)$/i && $1 eq "$gMaintainerEmail";
-    my $ins = !m/^(?:(?:subject|reply-to|return-path|mail-followup-to):
+    my $ins = !m/^(?:(?:subject|reply-to|return-path|
+                        mail-followup-to|
+                        references):
                 |From\s|X-Debbugs-)/xi;
     $fwd .= encode_utf8($hdr)."\n" if $ins;
     # print {$debugfh} ">$_<\n";
@@ -812,6 +814,12 @@ if (length($resentccval)) {
     $resentcc= "Resent-CC: $resentccval\n"; 
 }
 
+my $referencesval = join(' ',grep {defined $_} $header{'references'},$data->{msgid});
+my $references = '';
+if (!$newref && length($referencesval)) {
+    $references = "References: $referencesval\n";
+}
+
 my $common_headers='';
 {
     my @tmp = @common_headers;
@@ -831,7 +839,7 @@ Resent-Sender: $gMaintainerEmail
 X-$gProject-PR-Message: report $ref
 X-$gProject-PR-Package: $data->{package}
 X-$gProject-PR-Keywords: $data->{keywords}
-${source_pr_header}
+${references}${source_pr_header}
 END
     chomp $enc_msg;
     $enc_msg = encode_utf8($enc_msg).$fwd."\n";
@@ -854,7 +862,7 @@ Resent-Sender: $gMaintainerEmail
 X-$gProject-PR-Message: $report_followup $ref
 X-$gProject-PR-Package: $data->{package}
 X-$gProject-PR-Keywords: $data->{keywords}
-${source_pr_header}
+${references}${source_pr_header}
 END
     chomp $enc_msg;
     $enc_msg = encode_utf8($enc_msg).$fwd."\n";
@@ -888,7 +896,7 @@ Resent-Sender: $gMaintainerEmail
 ${common_headers}X-$gProject-PR-Message: $report_followup $ref
 X-$gProject-PR-Package: $data->{package}
 X-$gProject-PR-Keywords: $data->{keywords}
-${source_pr_header}
+${references}${source_pr_header}
 END
     chomp $enc_msg;
     $enc_msg = encode_utf8($enc_msg).$fwd."\n";