mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 16:52:41 +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,
|
$target_manual,
|
||||||
array(
|
array(
|
||||||
'local:commits',
|
'local:commits',
|
||||||
|
'arc:lint',
|
||||||
'arc:unit',
|
'arc:unit',
|
||||||
));
|
));
|
||||||
|
|
||||||
|
@ -177,8 +178,8 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
||||||
$warning->setSeverity(AphrontErrorView::SEVERITY_WARNING);
|
$warning->setSeverity(AphrontErrorView::SEVERITY_WARNING);
|
||||||
$warning->setWidth(AphrontErrorView::WIDTH_WIDE);
|
$warning->setWidth(AphrontErrorView::WIDTH_WIDE);
|
||||||
$warning->appendChild(
|
$warning->appendChild(
|
||||||
"<p>This diff is very large and affects {$count} files. Use ".
|
"<p>This diff is very large and affects {$count} files. Load ".
|
||||||
"Table of Contents to open files in a standalone view. ".
|
"each file individually. ".
|
||||||
"<strong>".
|
"<strong>".
|
||||||
phutil_render_tag(
|
phutil_render_tag(
|
||||||
'a',
|
'a',
|
||||||
|
@ -192,6 +193,23 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
||||||
$warning = $warning->render();
|
$warning = $warning->render();
|
||||||
|
|
||||||
$visible_changesets = array();
|
$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 {
|
} else {
|
||||||
$warning = null;
|
$warning = null;
|
||||||
$visible_changesets = $changesets;
|
$visible_changesets = $changesets;
|
||||||
|
|
|
@ -294,7 +294,6 @@ final class DifferentialRevisionCommentView extends AphrontView {
|
||||||
$item['href'] =
|
$item['href'] =
|
||||||
'D'.$this->comment->getRevisionID().
|
'D'.$this->comment->getRevisionID().
|
||||||
'?id='.$diff_id.
|
'?id='.$diff_id.
|
||||||
'&large=true'.
|
|
||||||
'#inline-'.$inline->getID();
|
'#inline-'.$inline->getID();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue