]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Run 'mark-committed' from 'arc land'
authorepriestley <git@epriestley.com>
Wed, 1 Feb 2012 22:32:43 +0000 (14:32 -0800)
committerepriestley <git@epriestley.com>
Wed, 1 Feb 2012 22:32:43 +0000 (14:32 -0800)
Summary:
  - Remove "new and experimental" because arc land is super awesome and great.
  - Run the 'mark-committed' finalize workflow after pushing for untracked repo
setups.

Test Plan: Ran "arc mark-committed --quiet --finalize 123". Will run "arc land"
on this. so lazy

Reviewers: cpiro, btrahan

Reviewed By: cpiro

CC: aran, epriestley
Maniphest Tasks: T819

Differential Revision: https://secure.phabricator.com/D1538

src/workflow/land/ArcanistLandWorkflow.php
src/workflow/mark-committed/ArcanistMarkCommittedWorkflow.php

index 742896d13d59470f4165087e620645477e8895d2..f81f734923f96a7b8e5a6e812cb1519f9ab71abf 100644 (file)
@@ -81,10 +81,6 @@ EOTEXT
   }
 
   public function run() {
-    $this->writeStatusMessage(
-      phutil_console_format(
-        "**WARNING:** 'arc land' is new and experimental.\n"));
-
     $branch = $this->getArgument('branch');
     if (count($branch) !== 1) {
       throw new ArcanistUsageException(
@@ -257,6 +253,15 @@ EOTEXT
         throw new ArcanistUsageException("'git push' failed.");
       }
 
+      $mark_workflow = $this->buildChildWorkflow(
+        'mark-committed',
+        array(
+          '--finalize',
+          '--quiet',
+          $revision['id'],
+        ));
+      $mark_workflow->run();
+
       echo "\n";
     }
 
index 6d4a326d0f8cfb4767352e0cf3edf346aad18e93..e8bbfa2f037270e29786e0ac71eb891bbcc612ed 100644 (file)
@@ -45,6 +45,9 @@ EOTEXT
           "revision is accepted. Continue even if the mark can't happen. This ".
           "is a soft version of 'mark-committed' used by other workflows.",
       ),
+      'quiet' => array(
+        'help' =>  'Do not print a success message.',
+      ),
       '*' => 'revision',
     );
   }
@@ -149,11 +152,13 @@ EOTEXT
       $is_finalized = false;
     }
 
-    if ($is_finalized) {
-      $message = $this->getRepositoryAPI()->getFinalizedRevisionMessage();
-      echo phutil_console_wrap($message)."\n";
-    } else {
-      echo "Done.\n";
+    if (!$this->getArgument('quiet')) {
+      if ($is_finalized) {
+        $message = $this->getRepositoryAPI()->getFinalizedRevisionMessage();
+        echo phutil_console_wrap($message)."\n";
+      } else {
+        echo "Done.\n";
+      }
     }
 
     return 0;