From: epriestley Date: Mon, 7 May 2012 15:16:14 +0000 (-0700) Subject: Finish "Committed" -> "Closed" changes X-Git-Tag: conduit-4~19 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=d40a30f10f147f8ccf0f8c8683a2359e4c1360f2;p=arcanist.git Finish "Committed" -> "Closed" changes Summary: Clean up the remaining odds-and-ends here -- move to "differential.close", get rid of the old constant, etc. I'll wait a week or two to land this since "differential.close" just landed and all the other stuff is trivial. Test Plan: Grepped for "committed". Reviewers: btrahan, vrana, Makinde Reviewed By: btrahan CC: aran Maniphest Tasks: T909, T1182 Differential Revision: https://secure.phabricator.com/D2309 --- diff --git a/src/branch/BranchInfo.php b/src/branch/BranchInfo.php index d1a6eda5..41bc7e7a 100644 --- a/src/branch/BranchInfo.php +++ b/src/branch/BranchInfo.php @@ -161,7 +161,7 @@ final class BranchInfo { */ private static function getColorForStatus($status) { static $status_to_color = array( - 'Committed' => 'cyan', + 'Closed' => 'cyan', 'Needs Review' => 'magenta', 'Needs Revision' => 'red', 'Accepted' => 'green', diff --git a/src/differential/constants/revisionstatus/ArcanistDifferentialRevisionStatus.php b/src/differential/constants/revisionstatus/ArcanistDifferentialRevisionStatus.php index e587a9d9..9c75e1bc 100644 --- a/src/differential/constants/revisionstatus/ArcanistDifferentialRevisionStatus.php +++ b/src/differential/constants/revisionstatus/ArcanistDifferentialRevisionStatus.php @@ -21,8 +21,7 @@ final class ArcanistDifferentialRevisionStatus { const NEEDS_REVIEW = 0; const NEEDS_REVISION = 1; const ACCEPTED = 2; - const COMMITTED = 3; // TODO: Remove. - const CLOSED = 3; // NOTE: Duplicate of "COMMITTED". + const CLOSED = 3; const ABANDONED = 4; public static function getNameForRevisionStatus($status) { diff --git a/src/workflow/branch/ArcanistBranchWorkflow.php b/src/workflow/branch/ArcanistBranchWorkflow.php index 8731f520..88566e8a 100644 --- a/src/workflow/branch/ArcanistBranchWorkflow.php +++ b/src/workflow/branch/ArcanistBranchWorkflow.php @@ -38,7 +38,7 @@ EOTEXT A wrapper on 'git branch'. It pulls data from Differential and displays the revision status next to the branch name. Branches are sorted in ascending order by the last commit time. - By default branches with committed/abandoned revisions + By default branches with closed/abandoned revisions are not displayed. EOTEXT ); @@ -61,7 +61,7 @@ EOTEXT return array( 'view-all' => array( 'help' => - "Include committed and abandoned revisions", + "Include closed and abandoned revisions", ), 'by-status' => array( 'help' => 'Group output by revision status.', @@ -120,7 +120,7 @@ EOTEXT } /** - * Removes the branches with status either committed or abandoned. + * Removes the branches with status either closed or abandoned. */ private function filterOutFinished() { foreach ($this->branches as $id => $branch) { @@ -128,7 +128,7 @@ EOTEXT continue; //never filter the current branch } $status = $branch->getStatus(); - if ($status == 'Committed' || $status == 'Abandoned') { + if ($status == 'Closed' || $status == 'Abandoned') { unset($this->branches[$id]); } } diff --git a/src/workflow/close-revision/ArcanistCloseRevisionWorkflow.php b/src/workflow/close-revision/ArcanistCloseRevisionWorkflow.php index 32152f1f..cb24081d 100644 --- a/src/workflow/close-revision/ArcanistCloseRevisionWorkflow.php +++ b/src/workflow/close-revision/ArcanistCloseRevisionWorkflow.php @@ -143,9 +143,9 @@ EOTEXT echo "Closing revision D{$revision_id} '{$revision_name}'...\n"; $conduit->callMethodSynchronous( - 'differential.markcommitted', + 'differential.close', array( - 'revision_id' => $revision_id, + 'revisionID' => $revision_id, )); } } diff --git a/src/workflow/git-hook-pre-receive/ArcanistGitHookPreReceiveWorkflow.php b/src/workflow/git-hook-pre-receive/ArcanistGitHookPreReceiveWorkflow.php index 2edc0126..b05d0ba6 100644 --- a/src/workflow/git-hook-pre-receive/ArcanistGitHookPreReceiveWorkflow.php +++ b/src/workflow/git-hook-pre-receive/ArcanistGitHookPreReceiveWorkflow.php @@ -121,9 +121,9 @@ EOTEXT $futures = array(); foreach ($mark_revisions as $revision_id) { $futures[] = $conduit->callMethod( - 'differential.markcommitted', + 'differential.close', array( - 'revision_id' => $revision_id, + 'revisionID' => $revision_id, )); } diff --git a/src/workflow/patch/ArcanistPatchWorkflow.php b/src/workflow/patch/ArcanistPatchWorkflow.php index d585b1aa..30e7b1b1 100644 --- a/src/workflow/patch/ArcanistPatchWorkflow.php +++ b/src/workflow/patch/ArcanistPatchWorkflow.php @@ -810,12 +810,11 @@ EOTEXT ); - // grab the latest committed revision only + // grab the latest closed revision only $found_revision = null; $revisions = isort($revisions, 'dateModified'); foreach ($revisions as $revision) { - if ($revision['status'] == - ArcanistDifferentialRevisionStatus::COMMITTED) { + if ($revision['status'] == ArcanistDifferentialRevisionStatus::CLOSED) { $found_revision = $revision; } }