1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 22:10:55 +01:00

Differential - fix bug writing affected paths

Summary: Fixes T4774. With the new code and configuration instructions downplaying the role of arcanist project we weren't writing affected paths at all! I had this issue on my installation - no affected paths were written. We seem to always have the repository now though if we can see it, so not too bad of a fix.

Test Plan: updated a diff and was able to browse in diffusion.

Reviewers: epriestley, bitglue

Reviewed By: epriestley, bitglue

Subscribers: bitglue, epriestley, Korvin

Maniphest Tasks: T4774

Differential Revision: https://secure.phabricator.com/D8757
This commit is contained in:
Bob Trahan 2014-04-11 12:54:21 -07:00
parent f86ab666f6
commit cb675a46a2

View file

@ -597,6 +597,7 @@ final class DifferentialTransactionEditor
$object->attachReviewerStatus($new_revision->getReviewerStatus()); $object->attachReviewerStatus($new_revision->getReviewerStatus());
$object->attachActiveDiff($new_revision->getActiveDiff()); $object->attachActiveDiff($new_revision->getActiveDiff());
$object->attachRepository($new_revision->getRepository());
foreach ($xactions as $xaction) { foreach ($xactions as $xaction) {
switch ($xaction->getTransactionType()) { switch ($xaction->getTransactionType()) {
@ -1519,20 +1520,9 @@ final class DifferentialTransactionEditor
DifferentialRevision $revision, DifferentialRevision $revision,
DifferentialDiff $diff) { DifferentialDiff $diff) {
$changesets = $diff->getChangesets(); $repository = $revision->getRepository();
// TODO: This all needs to be modernized.
$project = $diff->loadArcanistProject();
if (!$project) {
// Probably an old revision from before projects.
return;
}
$repository = $project->loadRepository();
if (!$repository) { if (!$repository) {
// Probably no project <-> repository link, or the repository where the // The repository where the code lives is untracked.
// project lives is untracked.
return; return;
} }
@ -1560,6 +1550,7 @@ final class DifferentialTransactionEditor
} }
} }
$changesets = $diff->getChangesets();
$paths = array(); $paths = array();
foreach ($changesets as $changeset) { foreach ($changesets as $changeset) {
$paths[] = $path_prefix.'/'.$changeset->getFilename(); $paths[] = $path_prefix.'/'.$changeset->getFilename();