From: epriestley Date: Mon, 6 Feb 2012 21:08:08 +0000 (-0800) Subject: Remove sourcePath references from Arcanist X-Git-Tag: conduit-4~154 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=d3b0b009ce3615b8021e990d607aa409797787b9;p=arcanist.git Remove sourcePath references from Arcanist Summary: These are meaningless / unreachable after D1491 and nonsense after D1582. Depends on D1579. Test Plan: Grepped for 'sourcePath' references. Reviewers: arice, btrahan Reviewed By: arice CC: aran, epriestley Maniphest Tasks: T838 Differential Revision: https://secure.phabricator.com/D1584 --- diff --git a/src/differential/revision/ArcanistDifferentialRevisionRef.php b/src/differential/revision/ArcanistDifferentialRevisionRef.php index 03796c68..be8ab60f 100644 --- a/src/differential/revision/ArcanistDifferentialRevisionRef.php +++ b/src/differential/revision/ArcanistDifferentialRevisionRef.php @@ -26,14 +26,12 @@ final class ArcanistDifferentialRevisionRef { protected $id; protected $name; protected $statusName; - protected $sourcePath; public static function newFromDictionary(array $dictionary) { $ref = new ArcanistDifferentialRevisionRef(); $ref->id = $dictionary['id']; $ref->name = $dictionary['name']; $ref->statusName = $dictionary['statusName']; - $ref->sourcePath = $dictionary['sourcePath']; return $ref; } @@ -53,8 +51,4 @@ final class ArcanistDifferentialRevisionRef { return $this->statusName; } - public function getSourcePath() { - return $this->sourcePath; - } - } diff --git a/src/workflow/base/ArcanistBaseWorkflow.php b/src/workflow/base/ArcanistBaseWorkflow.php index c5182058..9a9df597 100644 --- a/src/workflow/base/ArcanistBaseWorkflow.php +++ b/src/workflow/base/ArcanistBaseWorkflow.php @@ -688,14 +688,7 @@ abstract class ArcanistBaseWorkflow { $repository_api = $this->getRepositoryAPI(); - $candidates = array(); - $cur_path = $repository_api->getPath(); - foreach ($revisions as $revision) { - $source_path = $revision->getSourcePath(); - if ($source_path == $cur_path) { - $candidates[] = $revision; - } - } + $candidates = $revisions; if (count($candidates) == 1) { $candidate = reset($candidates);