1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 05:50:55 +01:00

Use first diff author for summary and test plan in commandeered revisions

Summary:
I thought about it a little bit and this makes the most sense for me:

# Original author usually writes at least something and commander only updates it.
# There's a creation date of revision (= first diff) by these comments. I don't want to change this date because I use this information. Author should correspond to this date.
# It solves all our repros.

Test Plan: Display commandeered revision.

Reviewers: nh, epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D2577
This commit is contained in:
vrana 2012-05-25 01:23:26 -07:00
parent f5e842ebd9
commit 1377d349e1

View file

@ -58,15 +58,13 @@ final class DifferentialRevisionViewController extends DifferentialController {
} }
} }
foreach ($diffs as $diff) {
if ($diff->getCreationMethod() != 'commit') {
$last_manual = $diff;
}
}
$target_manual = $target; $target_manual = $target;
if (!$target_id) { if (!$target_id) {
$target_manual = $last_manual; foreach ($diffs as $diff) {
if ($diff->getCreationMethod() != 'commit') {
$target_manual = $diff;
}
}
} }
$diffs = mpull($diffs, null, 'getID'); $diffs = mpull($diffs, null, 'getID');
@ -87,7 +85,7 @@ final class DifferentialRevisionViewController extends DifferentialController {
$comments = $revision->loadComments(); $comments = $revision->loadComments();
$comments = array_merge( $comments = array_merge(
$this->getImplicitComments($revision, $last_manual), $this->getImplicitComments($revision, reset($diffs)),
$comments); $comments);
$all_changesets = $changesets; $all_changesets = $changesets;