]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Finish "Committed" -> "Closed" changes
authorepriestley <git@epriestley.com>
Mon, 7 May 2012 15:16:14 +0000 (08:16 -0700)
committerepriestley <git@epriestley.com>
Mon, 7 May 2012 15:16:14 +0000 (08:16 -0700)
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

src/branch/BranchInfo.php
src/differential/constants/revisionstatus/ArcanistDifferentialRevisionStatus.php
src/workflow/branch/ArcanistBranchWorkflow.php
src/workflow/close-revision/ArcanistCloseRevisionWorkflow.php
src/workflow/git-hook-pre-receive/ArcanistGitHookPreReceiveWorkflow.php
src/workflow/patch/ArcanistPatchWorkflow.php

index d1a6eda52b5dace904e84247ce2abe4f7be53ee5..41bc7e7aa11caa08dee8d9c1ab28e853d62e2f70 100644 (file)
@@ -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',
index e587a9d9a221bae65c3df6710c56f637ae1f009c..9c75e1bc479062ad167c3feb773b18f39e6b5db4 100644 (file)
@@ -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) {
index 8731f5204924921fb49c4529035361aedb3a8c02..88566e8a5bba4470a1fd48377e8ba9514f8380ed 100644 (file)
@@ -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]);
       }
     }
index 32152f1f710d56f4afb28e2e18f4cb0f281d860d..cb24081d61a2a3f7982556c34d21a33aa72d8622 100644 (file)
@@ -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,
           ));
       }
     }
index 2edc012650ea94526d539e224970463a8e47663b..b05d0ba66e67beb6af969ec43a93ba98e544390e 100644 (file)
@@ -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,
         ));
     }
 
index d585b1aaaf12dfb3fe6aa3a210a300fb9c402b79..30e7b1b169f486ad62e9add5353deffc2ae504b9 100644 (file)
@@ -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;
       }
     }