mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +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:
parent
f5e842ebd9
commit
1377d349e1
1 changed files with 6 additions and 8 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue