From 3dc9afa28dc28587aa2e919c7bed85bdd79513ec Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 7 Mar 2014 08:09:33 -0800 Subject: [PATCH] Remove `differential.markcommitted` Summary: Ref T2222. Primary goal is to remove this callsite for `DifferentialCommentEditor`, but rather than updating it I'm just nuking this method since it's been deprecated for more than a year (more than two years?) Test Plan: Reloaded Conduit method list. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T2222 Differential Revision: https://secure.phabricator.com/D8424 --- src/__phutil_library_map__.php | 2 - ...tAPI_differential_markcommitted_Method.php | 62 ------------------- 2 files changed, 64 deletions(-) delete mode 100644 src/applications/differential/conduit/ConduitAPI_differential_markcommitted_Method.php diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 4ba16bbcaf..a18b211895 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -148,7 +148,6 @@ phutil_register_library_map(array( 'ConduitAPI_differential_getrawdiff_Method' => 'applications/differential/conduit/ConduitAPI_differential_getrawdiff_Method.php', 'ConduitAPI_differential_getrevision_Method' => 'applications/differential/conduit/ConduitAPI_differential_getrevision_Method.php', 'ConduitAPI_differential_getrevisioncomments_Method' => 'applications/differential/conduit/ConduitAPI_differential_getrevisioncomments_Method.php', - 'ConduitAPI_differential_markcommitted_Method' => 'applications/differential/conduit/ConduitAPI_differential_markcommitted_Method.php', 'ConduitAPI_differential_parsecommitmessage_Method' => 'applications/differential/conduit/ConduitAPI_differential_parsecommitmessage_Method.php', 'ConduitAPI_differential_query_Method' => 'applications/differential/conduit/ConduitAPI_differential_query_Method.php', 'ConduitAPI_differential_querydiffs_Method' => 'applications/differential/conduit/ConduitAPI_differential_querydiffs_Method.php', @@ -2724,7 +2723,6 @@ phutil_register_library_map(array( 'ConduitAPI_differential_getrawdiff_Method' => 'ConduitAPIMethod', 'ConduitAPI_differential_getrevision_Method' => 'ConduitAPIMethod', 'ConduitAPI_differential_getrevisioncomments_Method' => 'ConduitAPI_differential_Method', - 'ConduitAPI_differential_markcommitted_Method' => 'ConduitAPIMethod', 'ConduitAPI_differential_parsecommitmessage_Method' => 'ConduitAPIMethod', 'ConduitAPI_differential_query_Method' => 'ConduitAPIMethod', 'ConduitAPI_differential_querydiffs_Method' => 'ConduitAPIMethod', diff --git a/src/applications/differential/conduit/ConduitAPI_differential_markcommitted_Method.php b/src/applications/differential/conduit/ConduitAPI_differential_markcommitted_Method.php deleted file mode 100644 index 7bba22c24f..0000000000 --- a/src/applications/differential/conduit/ConduitAPI_differential_markcommitted_Method.php +++ /dev/null @@ -1,62 +0,0 @@ - 'required revision_id', - ); - } - - public function defineReturnType() { - return 'void'; - } - - public function defineErrorTypes() { - return array( - 'ERR_NOT_FOUND' => 'Revision was not found.', - ); - } - - protected function execute(ConduitAPIRequest $request) { - $id = $request->getValue('revision_id'); - - $revision = id(new DifferentialRevisionQuery()) - ->withIDs(array($id)) - ->setViewer($request->getUser()) - ->needRelationships(true) - ->needReviewerStatus(true) - ->executeOne(); - if (!$revision) { - throw new ConduitException('ERR_NOT_FOUND'); - } - - if ($revision->getStatus() == ArcanistDifferentialRevisionStatus::CLOSED) { - return; - } - - $editor = new DifferentialCommentEditor( - $revision, - DifferentialAction::ACTION_CLOSE); - $editor->setActor($request->getUser()); - $editor->save(); - } - -}