@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

When building a synthetic diff in Differential, adjust diff properties correctly

Summary:
See PHI1218. When rendering "A vs B", we currently show the properties of diff A without modification.

Instead, take properties from the same place we're taking change details.

See T12664 for a followup.

Test Plan:
- In diff A, removed "+x" from a file.
- In diff B, changed the file but did not remove "+x" from it.
- Diffed B vs A.
- Before change: UI incorrectly shows "+x" removed (both sides incorrect, just showing the change from diff A).
- After change: UI shows 100644 -> null, which is half right.

Reviewers: amckinley

Reviewed By: amckinley

Differential Revision: https://secure.phabricator.com/D20478

+6
+6
src/applications/differential/controller/DifferentialChangesetViewController.php
··· 110 110 111 111 if ($left) { 112 112 $left_data = $left->makeNewFile(); 113 + $left_properties = $left->getNewProperties(); 113 114 if ($right) { 114 115 $right_data = $right->makeNewFile(); 116 + $right_properties = $right->getNewProperties(); 115 117 } else { 116 118 $right_data = $left->makeOldFile(); 119 + $right_properties = $left->getOldProperties(); 117 120 } 118 121 119 122 $engine = new PhabricatorDifferenceEngine(); ··· 123 126 124 127 $choice = clone nonempty($left, $right); 125 128 $choice->attachHunks($synthetic->getHunks()); 129 + 130 + $choice->setOldProperties($left_properties); 131 + $choice->setNewProperties($right_properties); 126 132 127 133 $changeset = $choice; 128 134 }