Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13995240
D12899.id32862.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
14 KB
Referenced Files
None
Subscribers
None
D12899.id32862.diff
View Options
diff --git a/resources/sql/autopatches/20150708.arcanistproject.sql b/resources/sql/autopatches/20150708.arcanistproject.sql
new file mode 100644
--- /dev/null
+++ b/resources/sql/autopatches/20150708.arcanistproject.sql
@@ -0,0 +1,10 @@
+ALTER TABLE {$NAMESPACE}_differential.differential_diff
+ DROP COLUMN arcanistProjectPHID;
+
+ALTER TABLE {$NAMESPACE}_differential.differential_revision
+ DROP COLUMN arcanistProjectPHID;
+
+ALTER TABLE {$NAMESPACE}_releeph.releeph_project
+ DROP COLUMN arcanistProjectID;
+
+DROP TABLE {$NAMESPACE}_repository.repository_arcanistproject;
diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -173,7 +173,6 @@
'AphrontView' => 'view/AphrontView.php',
'AphrontWebpageResponse' => 'aphront/response/AphrontWebpageResponse.php',
'ArcanistConduitAPIMethod' => 'applications/arcanist/conduit/ArcanistConduitAPIMethod.php',
- 'ArcanistProjectInfoConduitAPIMethod' => 'applications/arcanist/conduit/ArcanistProjectInfoConduitAPIMethod.php',
'AuditConduitAPIMethod' => 'applications/audit/conduit/AuditConduitAPIMethod.php',
'AuditQueryConduitAPIMethod' => 'applications/audit/conduit/AuditQueryConduitAPIMethod.php',
'AuthManageProvidersCapability' => 'applications/auth/capability/AuthManageProvidersCapability.php',
@@ -2492,9 +2491,6 @@
'PhabricatorRemarkupUIExample' => 'applications/uiexample/examples/PhabricatorRemarkupUIExample.php',
'PhabricatorRepositoriesSetupCheck' => 'applications/config/check/PhabricatorRepositoriesSetupCheck.php',
'PhabricatorRepository' => 'applications/repository/storage/PhabricatorRepository.php',
- 'PhabricatorRepositoryArcanistProject' => 'applications/repository/storage/PhabricatorRepositoryArcanistProject.php',
- 'PhabricatorRepositoryArcanistProjectPHIDType' => 'applications/repository/phid/PhabricatorRepositoryArcanistProjectPHIDType.php',
- 'PhabricatorRepositoryArcanistProjectQuery' => 'applications/repository/query/PhabricatorRepositoryArcanistProjectQuery.php',
'PhabricatorRepositoryAuditRequest' => 'applications/repository/storage/PhabricatorRepositoryAuditRequest.php',
'PhabricatorRepositoryBranch' => 'applications/repository/storage/PhabricatorRepositoryBranch.php',
'PhabricatorRepositoryCommit' => 'applications/repository/storage/PhabricatorRepositoryCommit.php',
@@ -3598,7 +3594,6 @@
),
'AphrontWebpageResponse' => 'AphrontHTMLResponse',
'ArcanistConduitAPIMethod' => 'ConduitAPIMethod',
- 'ArcanistProjectInfoConduitAPIMethod' => 'ArcanistConduitAPIMethod',
'AuditConduitAPIMethod' => 'ConduitAPIMethod',
'AuditQueryConduitAPIMethod' => 'AuditConduitAPIMethod',
'AuthManageProvidersCapability' => 'PhabricatorPolicyCapability',
@@ -6290,13 +6285,6 @@
'PhabricatorProjectInterface',
'PhabricatorSpacesInterface',
),
- 'PhabricatorRepositoryArcanistProject' => array(
- 'PhabricatorRepositoryDAO',
- 'PhabricatorPolicyInterface',
- 'PhabricatorDestructibleInterface',
- ),
- 'PhabricatorRepositoryArcanistProjectPHIDType' => 'PhabricatorPHIDType',
- 'PhabricatorRepositoryArcanistProjectQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
'PhabricatorRepositoryAuditRequest' => array(
'PhabricatorRepositoryDAO',
'PhabricatorPolicyInterface',
diff --git a/src/applications/arcanist/conduit/ArcanistProjectInfoConduitAPIMethod.php b/src/applications/arcanist/conduit/ArcanistProjectInfoConduitAPIMethod.php
deleted file mode 100644
--- a/src/applications/arcanist/conduit/ArcanistProjectInfoConduitAPIMethod.php
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-
-final class ArcanistProjectInfoConduitAPIMethod
- extends ArcanistConduitAPIMethod {
-
- public function getAPIMethodName() {
- return 'arcanist.projectinfo';
- }
-
- public function getMethodStatus() {
- return self::METHOD_STATUS_DEPRECATED;
- }
-
- public function getMethodDescription() {
- return pht('Arcanist projects are deprecated.');
- }
-
- protected function defineParamTypes() {
- return array(
- 'name' => 'required string',
- );
- }
-
- protected function defineReturnType() {
- return 'nonempty dict';
- }
-
- protected function defineErrorTypes() {
- return array(
- 'ERR-BAD-ARCANIST-PROJECT' => pht('No such project exists.'),
- );
- }
-
- protected function execute(ConduitAPIRequest $request) {
- $name = $request->getValue('name');
-
- $project = id(new PhabricatorRepositoryArcanistProject())->loadOneWhere(
- 'name = %s',
- $name);
-
- if (!$project) {
- throw new ConduitException('ERR-BAD-ARCANIST-PROJECT');
- }
-
- $repository = null;
- if ($project->getRepositoryID()) {
- $repository = id(new PhabricatorRepositoryQuery())
- ->setViewer($request->getUser())
- ->withIDs(array($project->getRepositoryID()))
- ->executeOne();
- }
-
- $repository_phid = null;
- $tracked = false;
- $encoding = null;
- $dictionary = array();
- if ($repository) {
- $repository_phid = $repository->getPHID();
- $tracked = $repository->isTracked();
- $encoding = $repository->getDetail('encoding');
- $dictionary = $repository->toDictionary();
- }
-
- return array(
- 'name' => $project->getName(),
- 'phid' => $project->getPHID(),
- 'repositoryPHID' => $repository_phid,
- 'tracked' => $tracked,
- 'encoding' => $encoding,
- 'repository' => $dictionary,
- );
- }
-
-}
diff --git a/src/applications/differential/conduit/DifferentialCreateDiffConduitAPIMethod.php b/src/applications/differential/conduit/DifferentialCreateDiffConduitAPIMethod.php
--- a/src/applications/differential/conduit/DifferentialCreateDiffConduitAPIMethod.php
+++ b/src/applications/differential/conduit/DifferentialCreateDiffConduitAPIMethod.php
@@ -39,7 +39,6 @@
'sourceControlPath' => 'required string',
'sourceControlBaseRevision' => 'required string',
'creationMethod' => 'optional string',
- 'arcanistProject' => 'deprecated',
'lintStatus' => 'required '.$status_const,
'unitStatus' => 'required '.$status_const,
'repositoryPHID' => 'optional phid',
diff --git a/src/applications/differential/storage/DifferentialDiff.php b/src/applications/differential/storage/DifferentialDiff.php
--- a/src/applications/differential/storage/DifferentialDiff.php
+++ b/src/applications/differential/storage/DifferentialDiff.php
@@ -27,7 +27,6 @@
protected $branch;
protected $bookmark;
- protected $arcanistProjectPHID;
protected $creationMethod;
protected $repositoryUUID;
@@ -58,7 +57,6 @@
'lineCount' => 'uint32',
'branch' => 'text255?',
'bookmark' => 'text255?',
- 'arcanistProjectPHID' => 'phid?',
'repositoryUUID' => 'text64?',
// T6203/NULLABILITY
diff --git a/src/applications/differential/storage/DifferentialRevision.php b/src/applications/differential/storage/DifferentialRevision.php
--- a/src/applications/differential/storage/DifferentialRevision.php
+++ b/src/applications/differential/storage/DifferentialRevision.php
@@ -30,7 +30,6 @@
protected $mailKey;
protected $branchName;
- protected $arcanistProjectPHID;
protected $repositoryPHID;
protected $viewPolicy = PhabricatorPolicies::POLICY_USER;
protected $editPolicy = PhabricatorPolicies::POLICY_USER;
@@ -87,7 +86,6 @@
'lineCount' => 'uint32?',
'mailKey' => 'bytes40',
'branchName' => 'text255?',
- 'arcanistProjectPHID' => 'phid?',
'repositoryPHID' => 'phid?',
),
self::CONFIG_KEY_SCHEMA => array(
diff --git a/src/applications/releeph/storage/ReleephProject.php b/src/applications/releeph/storage/ReleephProject.php
--- a/src/applications/releeph/storage/ReleephProject.php
+++ b/src/applications/releeph/storage/ReleephProject.php
@@ -18,7 +18,6 @@
protected $repositoryPHID;
protected $isActive;
protected $createdByUserPHID;
- protected $arcanistProjectID;
protected $details = array();
@@ -34,7 +33,6 @@
'name' => 'text128',
'trunkBranch' => 'text255',
'isActive' => 'bool',
- 'arcanistProjectID' => 'id?',
),
self::CONFIG_KEY_SCHEMA => array(
'projectName' => array(
diff --git a/src/applications/repository/phid/PhabricatorRepositoryArcanistProjectPHIDType.php b/src/applications/repository/phid/PhabricatorRepositoryArcanistProjectPHIDType.php
deleted file mode 100644
--- a/src/applications/repository/phid/PhabricatorRepositoryArcanistProjectPHIDType.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-
-final class PhabricatorRepositoryArcanistProjectPHIDType
- extends PhabricatorPHIDType {
-
- const TYPECONST = 'APRJ';
-
- public function getTypeName() {
- return pht('Arcanist Project');
- }
-
- public function newObject() {
- return new PhabricatorRepositoryArcanistProject();
- }
-
- protected function buildQueryForObjects(
- PhabricatorObjectQuery $query,
- array $phids) {
-
- return id(new PhabricatorRepositoryArcanistProjectQuery())
- ->withPHIDs($phids);
- }
-
- public function loadHandles(
- PhabricatorHandleQuery $query,
- array $handles,
- array $objects) {
-
- foreach ($handles as $phid => $handle) {
- $project = $objects[$phid];
- $handle->setName($project->getName());
- }
- }
-
-}
diff --git a/src/applications/repository/query/PhabricatorRepositoryArcanistProjectQuery.php b/src/applications/repository/query/PhabricatorRepositoryArcanistProjectQuery.php
deleted file mode 100644
--- a/src/applications/repository/query/PhabricatorRepositoryArcanistProjectQuery.php
+++ /dev/null
@@ -1,87 +0,0 @@
-<?php
-
-final class PhabricatorRepositoryArcanistProjectQuery
- extends PhabricatorCursorPagedPolicyAwareQuery {
-
- private $ids;
- private $phids;
-
- private $needRepositories;
-
- public function withIDs(array $ids) {
- $this->ids = $ids;
- return $this;
- }
-
- public function withPHIDs(array $phids) {
- $this->phids = $phids;
- return $this;
- }
-
- public function needRepositories($need_repositories) {
- $this->needRepositories = $need_repositories;
- return $this;
- }
-
- protected function loadPage() {
- $table = new PhabricatorRepositoryArcanistProject();
- $conn_r = $table->establishConnection('r');
-
- $data = queryfx_all(
- $conn_r,
- 'SELECT * FROM %T %Q %Q %Q',
- $table->getTableName(),
- $this->buildWhereClause($conn_r),
- $this->buildOrderClause($conn_r),
- $this->buildLimitClause($conn_r));
-
- return $table->loadAllFromArray($data);
- }
-
- protected function willFilterPage(array $projects) {
- assert_instances_of($projects, 'PhabricatorRepositoryArcanistProject');
-
- if ($this->needRepositories) {
- $repository_ids = mpull($projects, 'getRepositoryID');
- $repositories = id(new PhabricatorRepositoryQuery())
- ->setViewer($this->getViewer())
- ->withIDs($repository_ids)
- ->execute();
- foreach ($projects as $project) {
- $repo = idx($repositories, $project->getRepositoryID());
- $project->attachRepository($repo);
- }
- }
-
- return $projects;
- }
-
- protected function buildWhereClause(AphrontDatabaseConnection $conn_r) {
- $where = array();
-
- if ($this->ids) {
- $where[] = qsprintf(
- $conn_r,
- 'id IN (%Ld)',
- $this->ids);
- }
-
- if ($this->phids) {
- $where[] = qsprintf(
- $conn_r,
- 'phid IN (%Ls)',
- $this->phids);
- }
-
- $where[] = $this->buildPagingClause($conn_r);
-
- return $this->formatWhereClause($where);
- }
-
-
- public function getQueryApplicationClass() {
- // TODO: Diffusion? Differential?
- return null;
- }
-
-}
diff --git a/src/applications/repository/storage/PhabricatorRepository.php b/src/applications/repository/storage/PhabricatorRepository.php
--- a/src/applications/repository/storage/PhabricatorRepository.php
+++ b/src/applications/repository/storage/PhabricatorRepository.php
@@ -1169,12 +1169,6 @@
$path->delete();
}
- $projects = id(new PhabricatorRepositoryArcanistProject())
- ->loadAllWhere('repositoryID = %d', $this->getID());
- foreach ($projects as $project) {
- $project->delete();
- }
-
queryfx(
$this->establishConnection('w'),
'DELETE FROM %T WHERE repositoryPHID = %s',
diff --git a/src/applications/repository/storage/PhabricatorRepositoryArcanistProject.php b/src/applications/repository/storage/PhabricatorRepositoryArcanistProject.php
deleted file mode 100644
--- a/src/applications/repository/storage/PhabricatorRepositoryArcanistProject.php
+++ /dev/null
@@ -1,89 +0,0 @@
-<?php
-
-final class PhabricatorRepositoryArcanistProject
- extends PhabricatorRepositoryDAO
- implements
- PhabricatorPolicyInterface,
- PhabricatorDestructibleInterface {
-
- protected $name;
- protected $repositoryID;
-
- private $repository = self::ATTACHABLE;
-
- protected function getConfiguration() {
- return array(
- self::CONFIG_AUX_PHID => true,
- self::CONFIG_TIMESTAMPS => false,
- self::CONFIG_COLUMN_SCHEMA => array(
- 'name' => 'text128',
- 'repositoryID' => 'id?',
- ),
- self::CONFIG_KEY_SCHEMA => array(
- 'key_phid' => null,
- 'phid' => array(
- 'columns' => array('phid'),
- 'unique' => true,
- ),
- 'name' => array(
- 'columns' => array('name'),
- 'unique' => true,
- ),
- ),
- ) + parent::getConfiguration();
- }
-
- public function generatePHID() {
- return PhabricatorPHID::generateNewPHID(
- PhabricatorRepositoryArcanistProjectPHIDType::TYPECONST);
- }
-
- public function getRepository() {
- return $this->assertAttached($this->repository);
- }
-
- public function attachRepository(PhabricatorRepository $repository = null) {
- $this->repository = $repository;
- return $this;
- }
-
-
-
-/* -( PhabricatorPolicyInterface )----------------------------------------- */
-
- public function getCapabilities() {
- return array(
- PhabricatorPolicyCapability::CAN_VIEW,
- PhabricatorPolicyCapability::CAN_EDIT,
- );
- }
-
- public function getPolicy($capability) {
- switch ($capability) {
- case PhabricatorPolicyCapability::CAN_VIEW:
- return PhabricatorPolicies::POLICY_USER;
- case PhabricatorPolicyCapability::CAN_EDIT:
- return PhabricatorPolicies::POLICY_ADMIN;
- }
- }
-
- public function hasAutomaticCapability($capability, PhabricatorUser $viewer) {
- return false;
- }
-
- public function describeAutomaticCapability($capability) {
- return null;
- }
-
-
-/* -( PhabricatorDestructibleInterface )----------------------------------- */
-
- public function destroyObjectPermanently(
- PhabricatorDestructionEngine $engine) {
-
- $this->openTransaction();
- $this->delete();
- $this->saveTransaction();
- }
-
-}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Oct 24, 11:35 AM (3 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6721361
Default Alt Text
D12899.id32862.diff (14 KB)
Attached To
Mode
D12899: Remove remaining arcanist project code
Attached
Detach File
Event Timeline
Log In to Comment