From f57199268f67bfa30b6f13e7336f0700e99f7294 Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 9 Mar 2012 08:57:24 -0800 Subject: [PATCH] Remove chooseRevision() and DifferentialRevisionRef Summary: `arc which` and related workflows have supplanted these now-unused mechanisms. Test Plan: Grepped for chooseRevision() and DifferentialRevisionRef. Reviewers: btrahan Reviewed By: btrahan CC: aran, epriestley Differential Revision: https://secure.phabricator.com/D1841 --- scripts/phutil_analyzer.php | 4 ++ src/__phutil_library_map__.php | 1 - .../ArcanistDifferentialRevisionRef.php | 54 ------------------ src/differential/revision/__init__.php | 19 ------- src/workflow/base/ArcanistBaseWorkflow.php | 55 ------------------- src/workflow/base/__init__.php | 2 - 6 files changed, 4 insertions(+), 131 deletions(-) delete mode 100644 src/differential/revision/ArcanistDifferentialRevisionRef.php delete mode 100644 src/differential/revision/__init__.php diff --git a/scripts/phutil_analyzer.php b/scripts/phutil_analyzer.php index 48c59a32..b43ff309 100755 --- a/scripts/phutil_analyzer.php +++ b/scripts/phutil_analyzer.php @@ -34,7 +34,11 @@ $builtin = array( 'print' => true, 'exit' => true, 'die' => true, + + // These are provided by libphutil but not visible in the map. + 'phutil_is_windows' => true, + 'phutil_load_library' => true, // HPHP/i defines these functions as 'internal', but they are NOT // builtins and do not exist in vanilla PHP. Make sure we don't mark them diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index c6f3b428..b695ff7e 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -36,7 +36,6 @@ phutil_register_library_map(array( 'ArcanistDifferentialCommitMessage' => 'differential/commitmessage', 'ArcanistDifferentialCommitMessageParserException' => 'differential/commitmessage', 'ArcanistDifferentialRevisionHash' => 'differential/constants/revisionhash', - 'ArcanistDifferentialRevisionRef' => 'differential/revision', 'ArcanistDifferentialRevisionStatus' => 'differential/constants/revisionstatus', 'ArcanistDownloadWorkflow' => 'workflow/download', 'ArcanistEventType' => 'events/constant/type', diff --git a/src/differential/revision/ArcanistDifferentialRevisionRef.php b/src/differential/revision/ArcanistDifferentialRevisionRef.php deleted file mode 100644 index be8ab60f..00000000 --- a/src/differential/revision/ArcanistDifferentialRevisionRef.php +++ /dev/null @@ -1,54 +0,0 @@ -id = $dictionary['id']; - $ref->name = $dictionary['name']; - $ref->statusName = $dictionary['statusName']; - return $ref; - } - - protected function __construct() { - - } - - public function getID() { - return $this->id; - } - - public function getName() { - return $this->name; - } - - public function getStatusName() { - return $this->statusName; - } - -} diff --git a/src/differential/revision/__init__.php b/src/differential/revision/__init__.php deleted file mode 100644 index 1d454f9a..00000000 --- a/src/differential/revision/__init__.php +++ /dev/null @@ -1,19 +0,0 @@ -getID()] = $ref; - } - - if ($revision_id) { - $revision_id = $this->normalizeRevisionID($revision_id); - if (empty($revisions[$revision_id])) { - throw new ArcanistChooseInvalidRevisionException(); - } - return $revisions[$revision_id]; - } - - if (!count($revisions)) { - throw new ArcanistChooseNoRevisionsException(); - } - - $repository_api = $this->getRepositoryAPI(); - - $candidates = $revisions; - - if (count($candidates) == 1) { - $candidate = reset($candidates); - $revision_id = $candidate->getID(); - } - - if ($revision_id) { - return $revisions[$revision_id]; - } - - $revision_indexes = array_keys($revisions); - - echo "\n"; - $ii = 1; - foreach ($revisions as $revision) { - echo ' ['.$ii++.'] D'.$revision->getID().' '.$revision->getName()."\n"; - } - - while (true) { - $id = phutil_console_prompt($prompt); - $id = trim(strtoupper($id), 'D'); - if (isset($revisions[$id])) { - return $revisions[$id]; - } - if (isset($revision_indexes[$id - 1])) { - return $revisions[$revision_indexes[$id - 1]]; - } - } - } protected function loadDiffBundleFromConduit( ConduitClient $conduit, diff --git a/src/workflow/base/__init__.php b/src/workflow/base/__init__.php index 49420f4d..f409b1b0 100644 --- a/src/workflow/base/__init__.php +++ b/src/workflow/base/__init__.php @@ -6,8 +6,6 @@ -phutil_require_module('arcanist', 'differential/revision'); -phutil_require_module('arcanist', 'exception'); phutil_require_module('arcanist', 'exception/usage'); phutil_require_module('arcanist', 'exception/usage/userabort'); phutil_require_module('arcanist', 'parser/bundle');