From cb675a46a24d1ae902c7067270b03e2ed13587e8 Mon Sep 17 00:00:00 2001 From: Bob Trahan Date: Fri, 11 Apr 2014 12:54:21 -0700 Subject: [PATCH] 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 --- .../editor/DifferentialTransactionEditor.php | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/src/applications/differential/editor/DifferentialTransactionEditor.php b/src/applications/differential/editor/DifferentialTransactionEditor.php index 46b71bbe8f..f7bf8230ac 100644 --- a/src/applications/differential/editor/DifferentialTransactionEditor.php +++ b/src/applications/differential/editor/DifferentialTransactionEditor.php @@ -597,6 +597,7 @@ final class DifferentialTransactionEditor $object->attachReviewerStatus($new_revision->getReviewerStatus()); $object->attachActiveDiff($new_revision->getActiveDiff()); + $object->attachRepository($new_revision->getRepository()); foreach ($xactions as $xaction) { switch ($xaction->getTransactionType()) { @@ -1519,20 +1520,9 @@ final class DifferentialTransactionEditor DifferentialRevision $revision, DifferentialDiff $diff) { - $changesets = $diff->getChangesets(); - - // TODO: This all needs to be modernized. - - $project = $diff->loadArcanistProject(); - if (!$project) { - // Probably an old revision from before projects. - return; - } - - $repository = $project->loadRepository(); + $repository = $revision->getRepository(); if (!$repository) { - // Probably no project <-> repository link, or the repository where the - // project lives is untracked. + // The repository where the code lives is untracked. return; } @@ -1560,6 +1550,7 @@ final class DifferentialTransactionEditor } } + $changesets = $diff->getChangesets(); $paths = array(); foreach ($changesets as $changeset) { $paths[] = $path_prefix.'/'.$changeset->getFilename();