mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 23:02:42 +01:00
Load changesets with inline comments in large diffs
Summary: Also fix the notice text. Test Plan: Display diff with inline comments and lint errors. Click on inline comment and lint link. Reviewers: epriestley Reviewed By: epriestley CC: aran, Koolvin Differential Revision: https://secure.phabricator.com/D2594
This commit is contained in:
parent
bbd5c8c187
commit
37b1ac5a24
2 changed files with 20 additions and 3 deletions
|
@ -71,6 +71,7 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
|||
$target_manual,
|
||||
array(
|
||||
'local:commits',
|
||||
'arc:lint',
|
||||
'arc:unit',
|
||||
));
|
||||
|
||||
|
@ -177,8 +178,8 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
|||
$warning->setSeverity(AphrontErrorView::SEVERITY_WARNING);
|
||||
$warning->setWidth(AphrontErrorView::WIDTH_WIDE);
|
||||
$warning->appendChild(
|
||||
"<p>This diff is very large and affects {$count} files. Use ".
|
||||
"Table of Contents to open files in a standalone view. ".
|
||||
"<p>This diff is very large and affects {$count} files. Load ".
|
||||
"each file individually. ".
|
||||
"<strong>".
|
||||
phutil_render_tag(
|
||||
'a',
|
||||
|
@ -192,6 +193,23 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
|||
$warning = $warning->render();
|
||||
|
||||
$visible_changesets = array();
|
||||
foreach ($inlines as $inline) {
|
||||
$changeset_id = $inline->getChangesetID();
|
||||
if (isset($changesets[$changeset_id])) {
|
||||
$visible_changesets[$changeset_id] = $changesets[$changeset_id];
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($props['arc:lint'])) {
|
||||
$changeset_paths = mpull($changesets, null, 'getFilename');
|
||||
foreach ($props['arc:lint'] as $lint) {
|
||||
$changeset = idx($changeset_paths, $lint['path']);
|
||||
if ($changeset) {
|
||||
$visible_changesets[$changeset->getID()] = $changeset;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
$warning = null;
|
||||
$visible_changesets = $changesets;
|
||||
|
|
|
@ -294,7 +294,6 @@ final class DifferentialRevisionCommentView extends AphrontView {
|
|||
$item['href'] =
|
||||
'D'.$this->comment->getRevisionID().
|
||||
'?id='.$diff_id.
|
||||
'&large=true'.
|
||||
'#inline-'.$inline->getID();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue