1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 08:42:41 +01:00

Fix "context not available" in contextless diffs

Summary: D4351 swapped this from a map to a list, and then stopped it from getting to the ChangesetParser so it didn't make it to the Renderer.

Test Plan: Ran "arc diff", copy/pasted it into the web UI. Saw a diff with "context not available" blocks in between missing contexts.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2009

Differential Revision: https://secure.phabricator.com/D4384
This commit is contained in:
epriestley 2013-01-10 09:51:52 -08:00
parent 58dcb00fd8
commit 9aeebbbf58
2 changed files with 4 additions and 2 deletions

View file

@ -593,6 +593,8 @@ final class DifferentialChangesetParser {
$this->setNewLines($hunk_parser->getNewLines());
$this->setIntraLineDiffs($hunk_parser->getIntraLineDiffs());
$this->setVisibileLinesMask($hunk_parser->getVisibleLinesMask());
$this->setMissingOldLineMarkerMap($hunk_parser->getOldLineMarkerMap());
$this->setMissingNewLineMarkerMap($hunk_parser->getNewLineMarkerMap());
$new_corpus = $hunk_parser->getNewCorpus();
$new_corpus_block = implode('', $new_corpus);

View file

@ -444,9 +444,9 @@ final class DifferentialHunkParser {
$old_line = $hunk->getOldOffset();
$new_line = $hunk->getNewOffset();
if ($old_line > 1) {
$old_line_marker_map[] = $old_line;
$old_line_marker_map[$old_line] = true;
} else if ($new_line > 1) {
$new_line_marker_map[] = $new_line;
$new_line_marker_map[$new_line] = true;
}
$num_lines = count($lines);