From 2a29a51080e1da82332091b796f42759fe693d39 Mon Sep 17 00:00:00 2001 From: Bob Trahan Date: Tue, 10 Jan 2012 11:39:11 -0800 Subject: [PATCH] Deploy new ArcanistManyWordsAboutDifferentialConstants class from D1328 into Phabricator Summary: ...this breaks without D1328. Used good ole "codemod" to do this work, with lots of manual edits around 80 chars. Test Plan: clicked around phabricator tool suite, particular differential, a bunch Reviewers: epriestley Reviewed By: epriestley CC: aran, epriestley Differential Revision: https://secure.phabricator.com/D1351 --- src/__phutil_library_map__.php | 2 - ...duitAPI_differential_creatediff_Method.php | 5 +- .../differential/creatediff/__init__.php | 2 +- .../ConduitAPI_differential_find_Method.php | 7 +-- .../method/differential/find/__init__.php | 3 +- ...uitAPI_differential_getrevision_Method.php | 7 +-- .../differential/getrevision/__init__.php | 3 +- ...tAPI_differential_markcommitted_Method.php | 7 +-- .../differential/markcommitted/__init__.php | 3 +- .../ConduitAPI_differential_query_Method.php | 9 ++-- .../method/differential/query/__init__.php | 5 +- ...API_differential_updaterevision_Method.php | 5 +- .../differential/updaterevision/__init__.php | 3 +- .../revisionhash/DifferentialRevisionHash.php | 35 ------------- .../constants/revisionhash/__init__.php | 10 ---- .../DifferentialRevisionStatus.php | 39 --------------- .../constants/revisionstatus/__init__.php | 12 ----- .../DifferentialRevisionListController.php | 2 +- .../controller/revisionlist/__init__.php | 3 +- .../DifferentialRevisionViewController.php | 20 ++++---- .../controller/revisionview/__init__.php | 3 +- .../DifferentialRevisionListData.php | 22 ++++----- .../data/revisionlist/__init__.php | 3 +- .../comment/DifferentialCommentEditor.php | 49 ++++++++++++------- .../differential/editor/comment/__init__.php | 3 +- .../revision/DifferentialRevisionEditor.php | 22 ++++----- .../differential/editor/revision/__init__.php | 5 +- ...entialRevisionStatusFieldSpecification.php | 7 +-- .../specification/revisionstatus/__init__.php | 3 +- .../mail/comment/DifferentialCommentMail.php | 5 +- .../differential/mail/comment/__init__.php | 3 +- .../revision/DifferentialRevisionQuery.php | 19 +++---- .../differential/query/revision/__init__.php | 5 +- .../storage/revision/DifferentialRevision.php | 6 +-- .../storage/revision/__init__.php | 3 +- .../DifferentialRevisionListView.php | 5 +- .../view/revisionlist/__init__.php | 3 +- .../data/PhabricatorObjectHandleData.php | 6 +-- .../phid/handle/data/__init__.php | 3 +- ...torRepositoryCommitMessageParserWorker.php | 13 ++--- .../commitmessageparser/base/__init__.php | 3 +- ...RepositoryGitCommitMessageParserWorker.php | 8 +-- .../commitmessageparser/git/__init__.php | 3 +- ...toryMercurialCommitMessageParserWorker.php | 5 +- .../mercurial/__init__.php | 3 +- .../PhabricatorSearchDifferentialIndexer.php | 8 +-- .../index/indexer/differential/__init__.php | 3 +- 47 files changed, 175 insertions(+), 228 deletions(-) delete mode 100644 src/applications/differential/constants/revisionhash/DifferentialRevisionHash.php delete mode 100644 src/applications/differential/constants/revisionhash/__init__.php delete mode 100644 src/applications/differential/constants/revisionstatus/DifferentialRevisionStatus.php delete mode 100644 src/applications/differential/constants/revisionstatus/__init__.php diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index a9d1d6ed89..1bdb734b2c 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -226,14 +226,12 @@ phutil_register_library_map(array( 'DifferentialRevisionDetailView' => 'applications/differential/view/revisiondetail', 'DifferentialRevisionEditController' => 'applications/differential/controller/revisionedit', 'DifferentialRevisionEditor' => 'applications/differential/editor/revision', - 'DifferentialRevisionHash' => 'applications/differential/constants/revisionhash', 'DifferentialRevisionIDFieldParserTestCase' => 'applications/differential/field/specification/revisionid/__tests__', 'DifferentialRevisionIDFieldSpecification' => 'applications/differential/field/specification/revisionid', 'DifferentialRevisionListController' => 'applications/differential/controller/revisionlist', 'DifferentialRevisionListData' => 'applications/differential/data/revisionlist', 'DifferentialRevisionListView' => 'applications/differential/view/revisionlist', 'DifferentialRevisionQuery' => 'applications/differential/query/revision', - 'DifferentialRevisionStatus' => 'applications/differential/constants/revisionstatus', 'DifferentialRevisionStatusFieldSpecification' => 'applications/differential/field/specification/revisionstatus', 'DifferentialRevisionUpdateHistoryView' => 'applications/differential/view/revisionupdatehistory', 'DifferentialRevisionViewController' => 'applications/differential/controller/revisionview', diff --git a/src/applications/conduit/method/differential/creatediff/ConduitAPI_differential_creatediff_Method.php b/src/applications/conduit/method/differential/creatediff/ConduitAPI_differential_creatediff_Method.php index 52342b534c..26ef2434c9 100644 --- a/src/applications/conduit/method/differential/creatediff/ConduitAPI_differential_creatediff_Method.php +++ b/src/applications/conduit/method/differential/creatediff/ConduitAPI_differential_creatediff_Method.php @@ -1,7 +1,7 @@ load($parent_id); if ($parent_rev) { - if ($parent_rev->getStatus() != DifferentialRevisionStatus::COMMITTED) { + if ($parent_rev->getStatus() != + ArcanistDifferentialRevisionStatus::COMMITTED) { $diff->setParentRevisionID($parent_id); } } diff --git a/src/applications/conduit/method/differential/creatediff/__init__.php b/src/applications/conduit/method/differential/creatediff/__init__.php index 137408c743..eaa4b0ffbe 100644 --- a/src/applications/conduit/method/differential/creatediff/__init__.php +++ b/src/applications/conduit/method/differential/creatediff/__init__.php @@ -6,11 +6,11 @@ +phutil_require_module('arcanist', 'differential/constants/revisionstatus'); phutil_require_module('arcanist', 'parser/diff/change'); phutil_require_module('phabricator', 'applications/conduit/method/base'); phutil_require_module('phabricator', 'applications/differential/constants/lintstatus'); -phutil_require_module('phabricator', 'applications/differential/constants/revisionstatus'); phutil_require_module('phabricator', 'applications/differential/constants/unitstatus'); phutil_require_module('phabricator', 'applications/differential/storage/diff'); phutil_require_module('phabricator', 'applications/differential/storage/revision'); diff --git a/src/applications/conduit/method/differential/find/ConduitAPI_differential_find_Method.php b/src/applications/conduit/method/differential/find/ConduitAPI_differential_find_Method.php index a6084762c4..7117543955 100644 --- a/src/applications/conduit/method/differential/find/ConduitAPI_differential_find_Method.php +++ b/src/applications/conduit/method/differential/find/ConduitAPI_differential_find_Method.php @@ -1,7 +1,7 @@ PhabricatorEnv::getProductionURI('/D'.$id), 'dateCreated' => $revision->getDateCreated(), 'authorPHID' => $revision->getAuthorPHID(), - 'statusName' => DifferentialRevisionStatus::getNameForRevisionStatus( - $revision->getStatus()), + 'statusName' => + ArcanistDifferentialRevisionStatus::getNameForRevisionStatus( + $revision->getStatus()), 'sourcePath' => $diff->getSourcePath(), ); } diff --git a/src/applications/conduit/method/differential/find/__init__.php b/src/applications/conduit/method/differential/find/__init__.php index f468d032ec..cb0380414e 100644 --- a/src/applications/conduit/method/differential/find/__init__.php +++ b/src/applications/conduit/method/differential/find/__init__.php @@ -6,8 +6,9 @@ +phutil_require_module('arcanist', 'differential/constants/revisionstatus'); + phutil_require_module('phabricator', 'applications/conduit/method/base'); -phutil_require_module('phabricator', 'applications/differential/constants/revisionstatus'); phutil_require_module('phabricator', 'applications/differential/data/revisionlist'); phutil_require_module('phabricator', 'infrastructure/env'); diff --git a/src/applications/conduit/method/differential/getrevision/ConduitAPI_differential_getrevision_Method.php b/src/applications/conduit/method/differential/getrevision/ConduitAPI_differential_getrevision_Method.php index 04ef4014f8..0bd34d29ed 100644 --- a/src/applications/conduit/method/differential/getrevision/ConduitAPI_differential_getrevision_Method.php +++ b/src/applications/conduit/method/differential/getrevision/ConduitAPI_differential_getrevision_Method.php @@ -1,7 +1,7 @@ PhabricatorEnv::getURI('/D'.$revision->getID()), 'title' => $revision->getTitle(), 'status' => $revision->getStatus(), - 'statusName' => DifferentialRevisionStatus::getNameForRevisionStatus( - $revision->getStatus()), + 'statusName' => + ArcanistDifferentialRevisionStatus::getNameForRevisionStatus( + $revision->getStatus()), 'summary' => $revision->getSummary(), 'testPlan' => $revision->getTestPlan(), 'lineCount' => $revision->getLineCount(), diff --git a/src/applications/conduit/method/differential/getrevision/__init__.php b/src/applications/conduit/method/differential/getrevision/__init__.php index 7865804c42..796c0186c7 100644 --- a/src/applications/conduit/method/differential/getrevision/__init__.php +++ b/src/applications/conduit/method/differential/getrevision/__init__.php @@ -6,9 +6,10 @@ +phutil_require_module('arcanist', 'differential/constants/revisionstatus'); + phutil_require_module('phabricator', 'applications/conduit/method/base'); phutil_require_module('phabricator', 'applications/conduit/protocol/exception'); -phutil_require_module('phabricator', 'applications/differential/constants/revisionstatus'); phutil_require_module('phabricator', 'applications/differential/field/selector/base'); phutil_require_module('phabricator', 'applications/differential/storage/auxiliaryfield'); phutil_require_module('phabricator', 'applications/differential/storage/revision'); diff --git a/src/applications/conduit/method/differential/markcommitted/ConduitAPI_differential_markcommitted_Method.php b/src/applications/conduit/method/differential/markcommitted/ConduitAPI_differential_markcommitted_Method.php index a8277739e4..7e29a10d8b 100644 --- a/src/applications/conduit/method/differential/markcommitted/ConduitAPI_differential_markcommitted_Method.php +++ b/src/applications/conduit/method/differential/markcommitted/ConduitAPI_differential_markcommitted_Method.php @@ -1,7 +1,7 @@ getStatus() == DifferentialRevisionStatus::COMMITTED) { + if ($revision->getStatus() == + ArcanistDifferentialRevisionStatus::COMMITTED) { // This can occur if someone runs 'mark-committed' and hits a race, or // they have a remote hook installed but don't have the // 'remote_hook_installed' flag set, or similar. In any case, just treat @@ -66,7 +67,7 @@ class ConduitAPI_differential_markcommitted_Method extends ConduitAPIMethod { DifferentialAction::ACTION_COMMIT); $editor->save(); - $revision->setStatus(DifferentialRevisionStatus::COMMITTED); + $revision->setStatus(ArcanistDifferentialRevisionStatus::COMMITTED); $revision->setDateCommitted(time()); $revision->save(); diff --git a/src/applications/conduit/method/differential/markcommitted/__init__.php b/src/applications/conduit/method/differential/markcommitted/__init__.php index 7dcc2ff73b..4d9f8c3305 100644 --- a/src/applications/conduit/method/differential/markcommitted/__init__.php +++ b/src/applications/conduit/method/differential/markcommitted/__init__.php @@ -6,10 +6,11 @@ +phutil_require_module('arcanist', 'differential/constants/revisionstatus'); + phutil_require_module('phabricator', 'applications/conduit/method/base'); phutil_require_module('phabricator', 'applications/conduit/protocol/exception'); phutil_require_module('phabricator', 'applications/differential/constants/action'); -phutil_require_module('phabricator', 'applications/differential/constants/revisionstatus'); phutil_require_module('phabricator', 'applications/differential/editor/comment'); phutil_require_module('phabricator', 'applications/differential/storage/revision'); diff --git a/src/applications/conduit/method/differential/query/ConduitAPI_differential_query_Method.php b/src/applications/conduit/method/differential/query/ConduitAPI_differential_query_Method.php index f1ce5a63ff..7aec24ce25 100644 --- a/src/applications/conduit/method/differential/query/ConduitAPI_differential_query_Method.php +++ b/src/applications/conduit/method/differential/query/ConduitAPI_differential_query_Method.php @@ -26,7 +26,7 @@ class ConduitAPI_differential_query_Method extends ConduitAPIMethod { } public function defineParamTypes() { - $hash_types = DifferentialRevisionHash::getTypes(); + $hash_types = ArcanistDifferentialRevisionHash::getTypes(); $hash_types = implode(', ', $hash_types); $status_types = array( @@ -107,7 +107,7 @@ class ConduitAPI_differential_query_Method extends ConduitAPIMethod { } */ if ($commit_hashes) { - $hash_types = DifferentialRevisionHash::getTypes(); + $hash_types = ArcanistDifferentialRevisionHash::getTypes(); foreach ($commit_hashes as $info) { list($type, $hash) = $info; if (empty($type) || @@ -168,8 +168,9 @@ class ConduitAPI_differential_query_Method extends ConduitAPIMethod { 'dateModified' => $revision->getDateModified(), 'authorPHID' => $revision->getAuthorPHID(), 'status' => $revision->getStatus(), - 'statusName' => DifferentialRevisionStatus::getNameForRevisionStatus( - $revision->getStatus()), + 'statusName' => + ArcanistDifferentialRevisionStatus::getNameForRevisionStatus( + $revision->getStatus()), 'sourcePath' => $diff->getSourcePath(), 'summary' => $revision->getSummary(), 'testPlan' => $revision->getTestPlan(), diff --git a/src/applications/conduit/method/differential/query/__init__.php b/src/applications/conduit/method/differential/query/__init__.php index 5b3038f125..131a224e23 100644 --- a/src/applications/conduit/method/differential/query/__init__.php +++ b/src/applications/conduit/method/differential/query/__init__.php @@ -6,10 +6,11 @@ +phutil_require_module('arcanist', 'differential/constants/revisionhash'); +phutil_require_module('arcanist', 'differential/constants/revisionstatus'); + phutil_require_module('phabricator', 'applications/conduit/method/base'); phutil_require_module('phabricator', 'applications/conduit/protocol/exception'); -phutil_require_module('phabricator', 'applications/differential/constants/revisionhash'); -phutil_require_module('phabricator', 'applications/differential/constants/revisionstatus'); phutil_require_module('phabricator', 'applications/differential/query/revision'); phutil_require_module('phabricator', 'infrastructure/env'); diff --git a/src/applications/conduit/method/differential/updaterevision/ConduitAPI_differential_updaterevision_Method.php b/src/applications/conduit/method/differential/updaterevision/ConduitAPI_differential_updaterevision_Method.php index f123ed3146..a219f0c522 100644 --- a/src/applications/conduit/method/differential/updaterevision/ConduitAPI_differential_updaterevision_Method.php +++ b/src/applications/conduit/method/differential/updaterevision/ConduitAPI_differential_updaterevision_Method.php @@ -1,7 +1,7 @@ getStatus() == DifferentialRevisionStatus::COMMITTED) { + if ($revision->getStatus() == + ArcanistDifferentialRevisionStatus::COMMITTED) { throw new ConduitException('ERR_COMMITTED'); } diff --git a/src/applications/conduit/method/differential/updaterevision/__init__.php b/src/applications/conduit/method/differential/updaterevision/__init__.php index e139660974..d8a6654cfb 100644 --- a/src/applications/conduit/method/differential/updaterevision/__init__.php +++ b/src/applications/conduit/method/differential/updaterevision/__init__.php @@ -6,9 +6,10 @@ +phutil_require_module('arcanist', 'differential/constants/revisionstatus'); + phutil_require_module('phabricator', 'applications/conduit/method/base'); phutil_require_module('phabricator', 'applications/conduit/protocol/exception'); -phutil_require_module('phabricator', 'applications/differential/constants/revisionstatus'); phutil_require_module('phabricator', 'applications/differential/editor/revision'); phutil_require_module('phabricator', 'applications/differential/storage/diff'); phutil_require_module('phabricator', 'applications/differential/storage/revision'); diff --git a/src/applications/differential/constants/revisionhash/DifferentialRevisionHash.php b/src/applications/differential/constants/revisionhash/DifferentialRevisionHash.php deleted file mode 100644 index 9de9dbe6cc..0000000000 --- a/src/applications/differential/constants/revisionhash/DifferentialRevisionHash.php +++ /dev/null @@ -1,35 +0,0 @@ - 'Needs Review', - self::NEEDS_REVISION => 'Needs Revision', - self::ACCEPTED => 'Accepted', - self::COMMITTED => 'Committed', - self::ABANDONED => 'Abandoned', - ); - - return idx($map, coalesce($status, '?'), 'Unknown'); - } - -} diff --git a/src/applications/differential/constants/revisionstatus/__init__.php b/src/applications/differential/constants/revisionstatus/__init__.php deleted file mode 100644 index 8d5cc9e019..0000000000 --- a/src/applications/differential/constants/revisionstatus/__init__.php +++ /dev/null @@ -1,12 +0,0 @@ -getStatus() == $status_review); $filter_is_author = ($revision->getAuthorPHID() == $user_phid); diff --git a/src/applications/differential/controller/revisionlist/__init__.php b/src/applications/differential/controller/revisionlist/__init__.php index ec0e48b2e7..7699cf9983 100644 --- a/src/applications/differential/controller/revisionlist/__init__.php +++ b/src/applications/differential/controller/revisionlist/__init__.php @@ -6,8 +6,9 @@ +phutil_require_module('arcanist', 'differential/constants/revisionstatus'); + phutil_require_module('phabricator', 'aphront/response/redirect'); -phutil_require_module('phabricator', 'applications/differential/constants/revisionstatus'); phutil_require_module('phabricator', 'applications/differential/controller/base'); phutil_require_module('phabricator', 'applications/differential/query/revision'); phutil_require_module('phabricator', 'applications/differential/view/revisionlist'); diff --git a/src/applications/differential/controller/revisionview/DifferentialRevisionViewController.php b/src/applications/differential/controller/revisionview/DifferentialRevisionViewController.php index ecb531f476..2131740807 100644 --- a/src/applications/differential/controller/revisionview/DifferentialRevisionViewController.php +++ b/src/applications/differential/controller/revisionview/DifferentialRevisionViewController.php @@ -403,46 +403,46 @@ class DifferentialRevisionViewController extends DifferentialController { if ($viewer_is_owner) { switch ($revision->getStatus()) { - case DifferentialRevisionStatus::NEEDS_REVIEW: + case ArcanistDifferentialRevisionStatus::NEEDS_REVIEW: $actions[DifferentialAction::ACTION_ABANDON] = true; $actions[DifferentialAction::ACTION_RETHINK] = true; break; - case DifferentialRevisionStatus::NEEDS_REVISION: + case ArcanistDifferentialRevisionStatus::NEEDS_REVISION: $actions[DifferentialAction::ACTION_ABANDON] = true; $actions[DifferentialAction::ACTION_REQUEST] = true; break; - case DifferentialRevisionStatus::ACCEPTED: + case ArcanistDifferentialRevisionStatus::ACCEPTED: $actions[DifferentialAction::ACTION_ABANDON] = true; $actions[DifferentialAction::ACTION_REQUEST] = true; $actions[DifferentialAction::ACTION_RETHINK] = true; break; - case DifferentialRevisionStatus::COMMITTED: + case ArcanistDifferentialRevisionStatus::COMMITTED: break; - case DifferentialRevisionStatus::ABANDONED: + case ArcanistDifferentialRevisionStatus::ABANDONED: $actions[DifferentialAction::ACTION_RECLAIM] = true; break; } } else { switch ($revision->getStatus()) { - case DifferentialRevisionStatus::NEEDS_REVIEW: + case ArcanistDifferentialRevisionStatus::NEEDS_REVIEW: $admin_actions[DifferentialAction::ACTION_ABANDON] = $viewer_is_admin; $actions[DifferentialAction::ACTION_ACCEPT] = true; $actions[DifferentialAction::ACTION_REJECT] = true; $actions[DifferentialAction::ACTION_RESIGN] = $viewer_is_reviewer; break; - case DifferentialRevisionStatus::NEEDS_REVISION: + case ArcanistDifferentialRevisionStatus::NEEDS_REVISION: $admin_actions[DifferentialAction::ACTION_ABANDON] = $viewer_is_admin; $actions[DifferentialAction::ACTION_ACCEPT] = true; $actions[DifferentialAction::ACTION_RESIGN] = $viewer_is_reviewer; break; - case DifferentialRevisionStatus::ACCEPTED: + case ArcanistDifferentialRevisionStatus::ACCEPTED: $admin_actions[DifferentialAction::ACTION_ABANDON] = $viewer_is_admin; $actions[DifferentialAction::ACTION_REJECT] = true; $actions[DifferentialAction::ACTION_RESIGN] = $viewer_is_reviewer && !$viewer_did_accept; break; - case DifferentialRevisionStatus::COMMITTED: - case DifferentialRevisionStatus::ABANDONED: + case ArcanistDifferentialRevisionStatus::COMMITTED: + case ArcanistDifferentialRevisionStatus::ABANDONED: break; } } diff --git a/src/applications/differential/controller/revisionview/__init__.php b/src/applications/differential/controller/revisionview/__init__.php index 90cd2eb579..a6dc324295 100644 --- a/src/applications/differential/controller/revisionview/__init__.php +++ b/src/applications/differential/controller/revisionview/__init__.php @@ -6,9 +6,10 @@ +phutil_require_module('arcanist', 'differential/constants/revisionstatus'); + phutil_require_module('phabricator', 'aphront/response/404'); phutil_require_module('phabricator', 'applications/differential/constants/action'); -phutil_require_module('phabricator', 'applications/differential/constants/revisionstatus'); phutil_require_module('phabricator', 'applications/differential/controller/base'); phutil_require_module('phabricator', 'applications/differential/field/selector/base'); phutil_require_module('phabricator', 'applications/differential/parser/changeset'); diff --git a/src/applications/differential/data/revisionlist/DifferentialRevisionListData.php b/src/applications/differential/data/revisionlist/DifferentialRevisionListData.php index cac9b86ed2..d442610758 100644 --- a/src/applications/differential/data/revisionlist/DifferentialRevisionListData.php +++ b/src/applications/differential/data/revisionlist/DifferentialRevisionListData.php @@ -1,7 +1,7 @@ revisions = $this->loadAllWhere( 'revision.status in (%Ld) AND revision.authorPHID in (%Ls)', array( - DifferentialRevisionStatus::ACCEPTED, + ArcanistDifferentialRevisionStatus::ACCEPTED, ), $this->ids); break; @@ -137,15 +137,15 @@ class DifferentialRevisionListData { $rev->getTableName(), $this->ids, array( - DifferentialRevisionStatus::NEEDS_REVISION, - DifferentialRevisionStatus::ACCEPTED, + ArcanistDifferentialRevisionStatus::NEEDS_REVISION, + ArcanistDifferentialRevisionStatus::ACCEPTED, ), $rev->getTableName(), DifferentialRevision::RELATIONSHIP_TABLE, DifferentialRevision::RELATION_REVIEWER, $this->ids, array( - DifferentialRevisionStatus::NEEDS_REVIEW, + ArcanistDifferentialRevisionStatus::NEEDS_REVIEW, ), $this->getOrderClause()); @@ -172,15 +172,15 @@ class DifferentialRevisionListData { $rev->getTableName(), $this->ids, array( - DifferentialRevisionStatus::NEEDS_REVIEW, + ArcanistDifferentialRevisionStatus::NEEDS_REVIEW, ), $rev->getTableName(), DifferentialRevision::RELATIONSHIP_TABLE, DifferentialRevision::RELATION_REVIEWER, $this->ids, array( - DifferentialRevisionStatus::NEEDS_REVISION, - DifferentialRevisionStatus::ACCEPTED, + ArcanistDifferentialRevisionStatus::NEEDS_REVISION, + ArcanistDifferentialRevisionStatus::ACCEPTED, ), $this->getOrderClause()); @@ -200,9 +200,9 @@ class DifferentialRevisionListData { private function getOpenStatuses() { return array( - DifferentialRevisionStatus::NEEDS_REVIEW, - DifferentialRevisionStatus::NEEDS_REVISION, - DifferentialRevisionStatus::ACCEPTED, + ArcanistDifferentialRevisionStatus::NEEDS_REVIEW, + ArcanistDifferentialRevisionStatus::NEEDS_REVISION, + ArcanistDifferentialRevisionStatus::ACCEPTED, ); } diff --git a/src/applications/differential/data/revisionlist/__init__.php b/src/applications/differential/data/revisionlist/__init__.php index 166a7864cf..b9a6a53386 100644 --- a/src/applications/differential/data/revisionlist/__init__.php +++ b/src/applications/differential/data/revisionlist/__init__.php @@ -6,7 +6,8 @@ -phutil_require_module('phabricator', 'applications/differential/constants/revisionstatus'); +phutil_require_module('arcanist', 'differential/constants/revisionstatus'); + phutil_require_module('phabricator', 'applications/differential/storage/revision'); phutil_require_module('phabricator', 'storage/queryfx'); diff --git a/src/applications/differential/editor/comment/DifferentialCommentEditor.php b/src/applications/differential/editor/comment/DifferentialCommentEditor.php index b242d1e6a7..21f6ae11d6 100644 --- a/src/applications/differential/editor/comment/DifferentialCommentEditor.php +++ b/src/applications/differential/editor/comment/DifferentialCommentEditor.php @@ -1,7 +1,7 @@ setStatus(DifferentialRevisionStatus::ABANDONED) + ->setStatus(ArcanistDifferentialRevisionStatus::ABANDONED) ->save(); break; @@ -150,14 +152,16 @@ class DifferentialCommentEditor { if ($actor_is_author) { throw new Exception('You can not accept your own revision.'); } - if (($revision_status != DifferentialRevisionStatus::NEEDS_REVIEW) && - ($revision_status != DifferentialRevisionStatus::NEEDS_REVISION)) { + if (($revision_status != + ArcanistDifferentialRevisionStatus::NEEDS_REVIEW) && + ($revision_status != + ArcanistDifferentialRevisionStatus::NEEDS_REVISION)) { $action = DifferentialAction::ACTION_COMMENT; break; } $revision - ->setStatus(DifferentialRevisionStatus::ACCEPTED) + ->setStatus(ArcanistDifferentialRevisionStatus::ACCEPTED) ->save(); if (!isset($reviewer_phids[$actor_phid])) { @@ -174,14 +178,16 @@ class DifferentialCommentEditor { if (!$actor_is_author) { throw new Exception('You must own a revision to request review.'); } - if (($revision_status != DifferentialRevisionStatus::NEEDS_REVISION) && - ($revision_status != DifferentialRevisionStatus::ACCEPTED)) { + if (($revision_status != + ArcanistDifferentialRevisionStatus::NEEDS_REVISION) && + ($revision_status != + ArcanistDifferentialRevisionStatus::ACCEPTED)) { $action = DifferentialAction::ACTION_COMMENT; break; } $revision - ->setStatus(DifferentialRevisionStatus::NEEDS_REVIEW) + ->setStatus(ArcanistDifferentialRevisionStatus::NEEDS_REVIEW) ->save(); break; @@ -190,8 +196,10 @@ class DifferentialCommentEditor { throw new Exception( 'You can not request changes to your own revision.'); } - if (($revision_status != DifferentialRevisionStatus::NEEDS_REVIEW) && - ($revision_status != DifferentialRevisionStatus::ACCEPTED)) { + if (($revision_status != + ArcanistDifferentialRevisionStatus::NEEDS_REVIEW) && + ($revision_status != + ArcanistDifferentialRevisionStatus::ACCEPTED)) { $action = DifferentialAction::ACTION_COMMENT; break; } @@ -206,7 +214,7 @@ class DifferentialCommentEditor { } $revision - ->setStatus(DifferentialRevisionStatus::NEEDS_REVISION) + ->setStatus(ArcanistDifferentialRevisionStatus::NEEDS_REVISION) ->save(); break; @@ -215,14 +223,16 @@ class DifferentialCommentEditor { throw new Exception( "You can not plan changes to somebody else's revision"); } - if (($revision_status != DifferentialRevisionStatus::NEEDS_REVIEW) && - ($revision_status != DifferentialRevisionStatus::ACCEPTED)) { + if (($revision_status != + ArcanistDifferentialRevisionStatus::NEEDS_REVIEW) && + ($revision_status != + ArcanistDifferentialRevisionStatus::ACCEPTED)) { $action = DifferentialAction::ACTION_COMMENT; break; } $revision - ->setStatus(DifferentialRevisionStatus::NEEDS_REVISION) + ->setStatus(ArcanistDifferentialRevisionStatus::NEEDS_REVISION) ->save(); break; @@ -230,18 +240,19 @@ class DifferentialCommentEditor { if (!$actor_is_author) { throw new Exception('You can not reclaim a revision you do not own.'); } - if ($revision_status != DifferentialRevisionStatus::ABANDONED) { + if ($revision_status != + ArcanistDifferentialRevisionStatus::ABANDONED) { $action = DifferentialAction::ACTION_COMMENT; break; } $revision - ->setStatus(DifferentialRevisionStatus::NEEDS_REVIEW) + ->setStatus(ArcanistDifferentialRevisionStatus::NEEDS_REVIEW) ->save(); break; case DifferentialAction::ACTION_COMMIT: $revision - ->setStatus(DifferentialRevisionStatus::COMMITTED) + ->setStatus(ArcanistDifferentialRevisionStatus::COMMITTED) ->save(); break; diff --git a/src/applications/differential/editor/comment/__init__.php b/src/applications/differential/editor/comment/__init__.php index a93e72f8f9..c04541ffa8 100644 --- a/src/applications/differential/editor/comment/__init__.php +++ b/src/applications/differential/editor/comment/__init__.php @@ -6,8 +6,9 @@ +phutil_require_module('arcanist', 'differential/constants/revisionstatus'); + phutil_require_module('phabricator', 'applications/differential/constants/action'); -phutil_require_module('phabricator', 'applications/differential/constants/revisionstatus'); phutil_require_module('phabricator', 'applications/differential/editor/revision'); phutil_require_module('phabricator', 'applications/differential/mail/comment'); phutil_require_module('phabricator', 'applications/differential/storage/changeset'); diff --git a/src/applications/differential/editor/revision/DifferentialRevisionEditor.php b/src/applications/differential/editor/revision/DifferentialRevisionEditor.php index 1a687f3287..72b7a2be66 100644 --- a/src/applications/differential/editor/revision/DifferentialRevisionEditor.php +++ b/src/applications/differential/editor/revision/DifferentialRevisionEditor.php @@ -1,7 +1,7 @@ setPHID($revision->generatePHID()); $revision->setAuthorPHID($user_phid); - $revision->setStatus(DifferentialRevisionStatus::NEEDS_REVIEW); + $revision->setStatus(ArcanistDifferentialRevisionStatus::NEEDS_REVIEW); $editor = new DifferentialRevisionEditor($revision, $user_phid); @@ -176,7 +176,7 @@ class DifferentialRevisionEditor { // ID for the revision if we don't have one already. $revision->setLineCount(0); if ($revision->getStatus() === null) { - $revision->setStatus(DifferentialRevisionStatus::NEEDS_REVIEW); + $revision->setStatus(ArcanistDifferentialRevisionStatus::NEEDS_REVIEW); } if ($revision->getTitle() === null) { $revision->setTitle('Untitled Revision'); @@ -381,9 +381,9 @@ class DifferentialRevisionEditor { // re-diffs after someone accepts with minor changes/suggestions. $status = $revision->getStatus(); - if ($status != DifferentialRevisionStatus::COMMITTED && - $status != DifferentialRevisionStatus::ACCEPTED) { - $revision->setStatus(DifferentialRevisionStatus::NEEDS_REVIEW); + if ($status != ArcanistDifferentialRevisionStatus::COMMITTED && + $status != ArcanistDifferentialRevisionStatus::ACCEPTED) { + $revision->setStatus(ArcanistDifferentialRevisionStatus::NEEDS_REVIEW); } } else { @@ -861,11 +861,11 @@ class DifferentialRevisionEditor { case DifferentialRevisionControlSystem::GIT: foreach ($data as $commit) { $hashes[] = array( - DifferentialRevisionHash::HASH_GIT_COMMIT, + ArcanistDifferentialRevisionHash::HASH_GIT_COMMIT, $commit['commit'], ); $hashes[] = array( - DifferentialRevisionHash::HASH_GIT_TREE, + ArcanistDifferentialRevisionHash::HASH_GIT_TREE, $commit['tree'], ); } @@ -873,7 +873,7 @@ class DifferentialRevisionEditor { case DifferentialRevisionControlSystem::MERCURIAL: foreach ($data as $commit) { $hashes[] = array( - DifferentialRevisionHash::HASH_MERCURIAL_COMMIT, + ArcanistDifferentialRevisionHash::HASH_MERCURIAL_COMMIT, $commit['rev'], ); } @@ -896,14 +896,14 @@ class DifferentialRevisionEditor { queryfx( $conn_w, 'DELETE FROM %T WHERE revisionID = %d', - DifferentialRevisionHash::TABLE_NAME, + ArcanistDifferentialRevisionHash::TABLE_NAME, $revision->getID()); if ($sql) { queryfx( $conn_w, 'INSERT INTO %T (revisionID, type, hash) VALUES %Q', - DifferentialRevisionHash::TABLE_NAME, + ArcanistDifferentialRevisionHash::TABLE_NAME, implode(', ', $sql)); } } diff --git a/src/applications/differential/editor/revision/__init__.php b/src/applications/differential/editor/revision/__init__.php index 6501371f08..cea18b2edb 100644 --- a/src/applications/differential/editor/revision/__init__.php +++ b/src/applications/differential/editor/revision/__init__.php @@ -6,10 +6,11 @@ +phutil_require_module('arcanist', 'differential/constants/revisionhash'); +phutil_require_module('arcanist', 'differential/constants/revisionstatus'); + phutil_require_module('phabricator', 'applications/differential/constants/action'); phutil_require_module('phabricator', 'applications/differential/constants/revisioncontrolsystem'); -phutil_require_module('phabricator', 'applications/differential/constants/revisionhash'); -phutil_require_module('phabricator', 'applications/differential/constants/revisionstatus'); phutil_require_module('phabricator', 'applications/differential/field/selector/base'); phutil_require_module('phabricator', 'applications/differential/mail/ccwelcome'); phutil_require_module('phabricator', 'applications/differential/mail/newdiff'); diff --git a/src/applications/differential/field/specification/revisionstatus/DifferentialRevisionStatusFieldSpecification.php b/src/applications/differential/field/specification/revisionstatus/DifferentialRevisionStatusFieldSpecification.php index f25e25ed62..a4540a38ac 100644 --- a/src/applications/differential/field/specification/revisionstatus/DifferentialRevisionStatusFieldSpecification.php +++ b/src/applications/differential/field/specification/revisionstatus/DifferentialRevisionStatusFieldSpecification.php @@ -1,7 +1,7 @@ getStatus(); $next_step = null; - if ($status == DifferentialRevisionStatus::ACCEPTED) { + if ($status == ArcanistDifferentialRevisionStatus::ACCEPTED) { switch ($diff->getSourceControlSystem()) { case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT: $next_step = 'arc amend --revision '.$revision->getID(); @@ -48,7 +48,8 @@ final class DifferentialRevisionStatusFieldSpecification 'Next step: '.phutil_escape_html($next_step).''; } } - $status = DifferentialRevisionStatus::getNameForRevisionStatus($status); + $status = + ArcanistDifferentialRevisionStatus::getNameForRevisionStatus($status); return ''.$status.''.$next_step; } diff --git a/src/applications/differential/field/specification/revisionstatus/__init__.php b/src/applications/differential/field/specification/revisionstatus/__init__.php index c8649c3340..a07a823770 100644 --- a/src/applications/differential/field/specification/revisionstatus/__init__.php +++ b/src/applications/differential/field/specification/revisionstatus/__init__.php @@ -6,7 +6,8 @@ -phutil_require_module('phabricator', 'applications/differential/constants/revisionstatus'); +phutil_require_module('arcanist', 'differential/constants/revisionstatus'); + phutil_require_module('phabricator', 'applications/differential/field/specification/base'); phutil_require_module('phabricator', 'applications/repository/constants/repositorytype'); diff --git a/src/applications/differential/mail/comment/DifferentialCommentMail.php b/src/applications/differential/mail/comment/DifferentialCommentMail.php index 417f1e147b..f0bfac467e 100644 --- a/src/applications/differential/mail/comment/DifferentialCommentMail.php +++ b/src/applications/differential/mail/comment/DifferentialCommentMail.php @@ -1,7 +1,7 @@ getRevision(); - if ($revision->getStatus() == DifferentialRevisionStatus::COMMITTED) { + if ($revision->getStatus() == + ArcanistDifferentialRevisionStatus::COMMITTED) { $phids = $revision->loadCommitPHIDs(); if ($phids) { $handles = id(new PhabricatorObjectHandleData($phids))->loadHandles(); diff --git a/src/applications/differential/mail/comment/__init__.php b/src/applications/differential/mail/comment/__init__.php index 51b6e24688..b624a2bd37 100644 --- a/src/applications/differential/mail/comment/__init__.php +++ b/src/applications/differential/mail/comment/__init__.php @@ -6,8 +6,9 @@ +phutil_require_module('arcanist', 'differential/constants/revisionstatus'); + phutil_require_module('phabricator', 'applications/differential/constants/action'); -phutil_require_module('phabricator', 'applications/differential/constants/revisionstatus'); phutil_require_module('phabricator', 'applications/differential/mail/base'); phutil_require_module('phabricator', 'applications/differential/storage/comment'); phutil_require_module('phabricator', 'applications/phid/handle/data'); diff --git a/src/applications/differential/query/revision/DifferentialRevisionQuery.php b/src/applications/differential/query/revision/DifferentialRevisionQuery.php index 68265d9478..7515ee6086 100644 --- a/src/applications/differential/query/revision/DifferentialRevisionQuery.php +++ b/src/applications/differential/query/revision/DifferentialRevisionQuery.php @@ -135,8 +135,9 @@ final class DifferentialRevisionQuery { * Calling this function will clear anything set by previous calls to * @{method:withCommitHashes}. * - * @param array List of pairs + * @param array List of pairs * @return this * @task config */ @@ -381,9 +382,9 @@ final class DifferentialRevisionQuery { $responsible_phid = reset($this->responsibles); $open_statuses = array( - DifferentialRevisionStatus::NEEDS_REVIEW, - DifferentialRevisionStatus::NEEDS_REVISION, - DifferentialRevisionStatus::ACCEPTED, + ArcanistDifferentialRevisionStatus::NEEDS_REVIEW, + ArcanistDifferentialRevisionStatus::NEEDS_REVISION, + ArcanistDifferentialRevisionStatus::ACCEPTED, ); return queryfx_all( @@ -461,7 +462,7 @@ final class DifferentialRevisionQuery { $joins[] = qsprintf( $conn_r, 'JOIN %T hash_rel ON hash_rel.revisionID = r.id', - DifferentialRevisionHash::TABLE_NAME); + ArcanistDifferentialRevisionHash::TABLE_NAME); } if ($this->ccs) { @@ -587,9 +588,9 @@ final class DifferentialRevisionQuery { $conn_r, 'status IN (%Ld)', array( - DifferentialRevisionStatus::NEEDS_REVIEW, - DifferentialRevisionStatus::NEEDS_REVISION, - DifferentialRevisionStatus::ACCEPTED, + ArcanistDifferentialRevisionStatus::NEEDS_REVIEW, + ArcanistDifferentialRevisionStatus::NEEDS_REVISION, + ArcanistDifferentialRevisionStatus::ACCEPTED, )); break; default: diff --git a/src/applications/differential/query/revision/__init__.php b/src/applications/differential/query/revision/__init__.php index 2d35e400f0..175d01879b 100644 --- a/src/applications/differential/query/revision/__init__.php +++ b/src/applications/differential/query/revision/__init__.php @@ -6,8 +6,9 @@ -phutil_require_module('phabricator', 'applications/differential/constants/revisionhash'); -phutil_require_module('phabricator', 'applications/differential/constants/revisionstatus'); +phutil_require_module('arcanist', 'differential/constants/revisionhash'); +phutil_require_module('arcanist', 'differential/constants/revisionstatus'); + phutil_require_module('phabricator', 'applications/differential/storage/affectedpath'); phutil_require_module('phabricator', 'applications/differential/storage/diff'); phutil_require_module('phabricator', 'applications/differential/storage/revision'); diff --git a/src/applications/differential/storage/revision/DifferentialRevision.php b/src/applications/differential/storage/revision/DifferentialRevision.php index edd1168112..e203ed183c 100644 --- a/src/applications/differential/storage/revision/DifferentialRevision.php +++ b/src/applications/differential/storage/revision/DifferentialRevision.php @@ -1,7 +1,7 @@ status == DifferentialRevisionStatus::ACCEPTED || - $this->status == DifferentialRevisionStatus::COMMITTED) { + if ($this->status == ArcanistDifferentialRevisionStatus::ACCEPTED || + $this->status == ArcanistDifferentialRevisionStatus::COMMITTED) { $comments = $this->loadComments(); foreach ($comments as $comment) { $action = $comment->getAction(); diff --git a/src/applications/differential/storage/revision/__init__.php b/src/applications/differential/storage/revision/__init__.php index 7307f419a1..199d8534ae 100644 --- a/src/applications/differential/storage/revision/__init__.php +++ b/src/applications/differential/storage/revision/__init__.php @@ -6,8 +6,9 @@ +phutil_require_module('arcanist', 'differential/constants/revisionstatus'); + phutil_require_module('phabricator', 'applications/differential/constants/action'); -phutil_require_module('phabricator', 'applications/differential/constants/revisionstatus'); phutil_require_module('phabricator', 'applications/differential/storage/base'); phutil_require_module('phabricator', 'applications/differential/storage/comment'); phutil_require_module('phabricator', 'applications/differential/storage/diff'); diff --git a/src/applications/differential/view/revisionlist/DifferentialRevisionListView.php b/src/applications/differential/view/revisionlist/DifferentialRevisionListView.php index 83fb49a9ac..a52219677c 100644 --- a/src/applications/differential/view/revisionlist/DifferentialRevisionListView.php +++ b/src/applications/differential/view/revisionlist/DifferentialRevisionListView.php @@ -1,7 +1,7 @@ revisions as $revision) { $status = $revision->getStatus(); - $status = DifferentialRevisionStatus::getNameForRevisionStatus($status); + $status = + ArcanistDifferentialRevisionStatus::getNameForRevisionStatus($status); $reviewer_phids = $revision->getReviewers(); if ($reviewer_phids) { diff --git a/src/applications/differential/view/revisionlist/__init__.php b/src/applications/differential/view/revisionlist/__init__.php index 8c33583de6..090036fc33 100644 --- a/src/applications/differential/view/revisionlist/__init__.php +++ b/src/applications/differential/view/revisionlist/__init__.php @@ -6,7 +6,8 @@ -phutil_require_module('phabricator', 'applications/differential/constants/revisionstatus'); +phutil_require_module('arcanist', 'differential/constants/revisionstatus'); + phutil_require_module('phabricator', 'view/base'); phutil_require_module('phabricator', 'view/control/table'); phutil_require_module('phabricator', 'view/utils'); diff --git a/src/applications/phid/handle/data/PhabricatorObjectHandleData.php b/src/applications/phid/handle/data/PhabricatorObjectHandleData.php index c8c9e75d1a..1b4b5f2159 100644 --- a/src/applications/phid/handle/data/PhabricatorObjectHandleData.php +++ b/src/applications/phid/handle/data/PhabricatorObjectHandleData.php @@ -1,7 +1,7 @@ setComplete(true); $status = $rev->getStatus(); - if (($status == DifferentialRevisionStatus::COMMITTED) || - ($status == DifferentialRevisionStatus::ABANDONED)) { + if (($status == ArcanistDifferentialRevisionStatus::COMMITTED) || + ($status == ArcanistDifferentialRevisionStatus::ABANDONED)) { $closed = PhabricatorObjectHandleStatus::STATUS_CLOSED; $handle->setStatus($closed); } diff --git a/src/applications/phid/handle/data/__init__.php b/src/applications/phid/handle/data/__init__.php index 9c767d820f..7e7e93e86b 100644 --- a/src/applications/phid/handle/data/__init__.php +++ b/src/applications/phid/handle/data/__init__.php @@ -6,7 +6,8 @@ -phutil_require_module('phabricator', 'applications/differential/constants/revisionstatus'); +phutil_require_module('arcanist', 'differential/constants/revisionstatus'); + phutil_require_module('phabricator', 'applications/files/storage/file'); phutil_require_module('phabricator', 'applications/maniphest/constants/owner'); phutil_require_module('phabricator', 'applications/maniphest/constants/status'); diff --git a/src/applications/repository/worker/commitmessageparser/base/PhabricatorRepositoryCommitMessageParserWorker.php b/src/applications/repository/worker/commitmessageparser/base/PhabricatorRepositoryCommitMessageParserWorker.php index 82d902082a..08deae8521 100644 --- a/src/applications/repository/worker/commitmessageparser/base/PhabricatorRepositoryCommitMessageParserWorker.php +++ b/src/applications/repository/worker/commitmessageparser/base/PhabricatorRepositoryCommitMessageParserWorker.php @@ -87,7 +87,8 @@ abstract class PhabricatorRepositoryCommitMessageParserWorker $revision->getID(), $commit->getPHID()); - if ($revision->getStatus() != DifferentialRevisionStatus::COMMITTED) { + if ($revision->getStatus() != + ArcanistDifferentialRevisionStatus::COMMITTED) { $message = null; $committer = $data->getCommitDetail('authorPHID'); if (!$committer) { @@ -123,18 +124,18 @@ abstract class PhabricatorRepositoryCommitMessageParserWorker foreach ($revisions as $revision) { switch ($revision->getStatus()) { // "Accepted" revisions -- ostensibly what we're looking for! - case DifferentialRevisionStatus::ACCEPTED: + case ArcanistDifferentialRevisionStatus::ACCEPTED: $first_choice[] = $revision; break; // "Open" revisions - case DifferentialRevisionStatus::NEEDS_REVIEW: - case DifferentialRevisionStatus::NEEDS_REVISION: + case ArcanistDifferentialRevisionStatus::NEEDS_REVIEW: + case ArcanistDifferentialRevisionStatus::NEEDS_REVISION: $second_choice[] = $revision; break; // default is a wtf? here default: - case DifferentialRevisionStatus::ABANDONED: - case DifferentialRevisionStatus::COMMITTED: + case ArcanistDifferentialRevisionStatus::ABANDONED: + case ArcanistDifferentialRevisionStatus::COMMITTED: $third_choice[] = $revision; break; } diff --git a/src/applications/repository/worker/commitmessageparser/base/__init__.php b/src/applications/repository/worker/commitmessageparser/base/__init__.php index 8a61255fbe..2822576917 100644 --- a/src/applications/repository/worker/commitmessageparser/base/__init__.php +++ b/src/applications/repository/worker/commitmessageparser/base/__init__.php @@ -6,8 +6,9 @@ +phutil_require_module('arcanist', 'differential/constants/revisionstatus'); + phutil_require_module('phabricator', 'applications/differential/constants/action'); -phutil_require_module('phabricator', 'applications/differential/constants/revisionstatus'); phutil_require_module('phabricator', 'applications/differential/editor/comment'); phutil_require_module('phabricator', 'applications/differential/query/revision'); phutil_require_module('phabricator', 'applications/differential/storage/revision'); diff --git a/src/applications/repository/worker/commitmessageparser/git/PhabricatorRepositoryGitCommitMessageParserWorker.php b/src/applications/repository/worker/commitmessageparser/git/PhabricatorRepositoryGitCommitMessageParserWorker.php index 4d18075abe..3a252b7be4 100644 --- a/src/applications/repository/worker/commitmessageparser/git/PhabricatorRepositoryGitCommitMessageParserWorker.php +++ b/src/applications/repository/worker/commitmessageparser/git/PhabricatorRepositoryGitCommitMessageParserWorker.php @@ -1,7 +1,7 @@ getCommitIdentifier(); return array( - array(DifferentialRevisionHash::HASH_MERCURIAL_COMMIT, $commit_hash), + array(ArcanistDifferentialRevisionHash::HASH_MERCURIAL_COMMIT, + $commit_hash), ); } diff --git a/src/applications/repository/worker/commitmessageparser/mercurial/__init__.php b/src/applications/repository/worker/commitmessageparser/mercurial/__init__.php index a0bdf0a813..9fb69b5726 100644 --- a/src/applications/repository/worker/commitmessageparser/mercurial/__init__.php +++ b/src/applications/repository/worker/commitmessageparser/mercurial/__init__.php @@ -6,7 +6,8 @@ -phutil_require_module('phabricator', 'applications/differential/constants/revisionhash'); +phutil_require_module('arcanist', 'differential/constants/revisionhash'); + phutil_require_module('phabricator', 'applications/repository/worker/commitmessageparser/base'); phutil_require_module('phabricator', 'infrastructure/daemon/workers/storage/task'); diff --git a/src/applications/search/index/indexer/differential/PhabricatorSearchDifferentialIndexer.php b/src/applications/search/index/indexer/differential/PhabricatorSearchDifferentialIndexer.php index a2bea4d003..587c23e9cf 100644 --- a/src/applications/search/index/indexer/differential/PhabricatorSearchDifferentialIndexer.php +++ b/src/applications/search/index/indexer/differential/PhabricatorSearchDifferentialIndexer.php @@ -1,7 +1,7 @@ getDateCreated()); - if ($rev->getStatus() != DifferentialRevisionStatus::COMMITTED && - $rev->getStatus() != DifferentialRevisionStatus::ABANDONED) { + if ($rev->getStatus() != ArcanistDifferentialRevisionStatus::COMMITTED && + $rev->getStatus() != ArcanistDifferentialRevisionStatus::ABANDONED) { $doc->addRelationship( PhabricatorSearchRelationship::RELATIONSHIP_OPEN, $rev->getPHID(), @@ -82,7 +82,7 @@ class PhabricatorSearchDifferentialIndexer // If a revision needs review, the owners are the reviewers. Otherwise, the // owner is the author (e.g., accepted, rejected, committed). - if ($rev->getStatus() == DifferentialRevisionStatus::NEEDS_REVIEW) { + if ($rev->getStatus() == ArcanistDifferentialRevisionStatus::NEEDS_REVIEW) { foreach ($rev->getReviewers() as $phid) { $doc->addRelationship( PhabricatorSearchRelationship::RELATIONSHIP_OWNER, diff --git a/src/applications/search/index/indexer/differential/__init__.php b/src/applications/search/index/indexer/differential/__init__.php index 5853ef1671..3b9f6b4f04 100644 --- a/src/applications/search/index/indexer/differential/__init__.php +++ b/src/applications/search/index/indexer/differential/__init__.php @@ -6,7 +6,8 @@ -phutil_require_module('phabricator', 'applications/differential/constants/revisionstatus'); +phutil_require_module('arcanist', 'differential/constants/revisionstatus'); + phutil_require_module('phabricator', 'applications/differential/storage/inlinecomment'); phutil_require_module('phabricator', 'applications/phid/constants'); phutil_require_module('phabricator', 'applications/phid/handle/data');