1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-29 17:00:59 +01:00

Send patch attachments instead of diff attachments.

Test Plan:
Turn on sending patches, create a new revision - you should get a .patch file in
your mail instead of a .diff file.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: 1016
This commit is contained in:
Marek Sapota 2011-10-18 12:13:23 -07:00
parent 38115118e9
commit 5d377e246a

View file

@ -88,7 +88,7 @@ abstract class DifferentialReviewRequestMail extends DifferentialMail {
$diff_number = count($diffs); $diff_number = count($diffs);
$diff = array_pop($diffs); $diff = array_pop($diffs);
$filename = "D{$revision_id}.{$diff_number}.diff"; $filename = "D{$revision_id}.{$diff_number}.patch";
$diff->attachChangesets($diff->loadChangesets()); $diff->attachChangesets($diff->loadChangesets());
// TODO: We could batch this to improve performance. // TODO: We could batch this to improve performance.
@ -107,7 +107,7 @@ abstract class DifferentialReviewRequestMail extends DifferentialMail {
$attachments[] = array( $attachments[] = array(
'data' => $unified_diff, 'data' => $unified_diff,
'filename' => $filename, 'filename' => $filename,
'mimetype' => 'text/x-diff; charset=utf-8' 'mimetype' => 'text/x-patch; charset=utf-8'
); );
} }
return $attachments; return $attachments;