]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Save committed revision id in workflow.
authorMarek Sapota <mareksapota@fb.com>
Fri, 4 Nov 2011 19:12:14 +0000 (12:12 -0700)
committerMarek Sapota <mareksapota@fb.com>
Fri, 4 Nov 2011 19:13:03 +0000 (12:13 -0700)
Summary:
Save commited revision id in workflow, so it can be used in Arcanist
didRunWorkflow hook.

Test Plan:
Running getRevisionID on the workflow should return id of the committed
revision.

Reviewers: epriestley, jungejason

Reviewed By: epriestley

CC: aran, epriestley, mareksapota
Differential Revision: 1078

src/workflow/commit/ArcanistCommitWorkflow.php

index d40a837d39375897d9471fb86c60329d81954585..cd4a882987ebd4b85f77cbfabd7d64cac83bab1b 100644 (file)
@@ -23,6 +23,8 @@
  */
 class ArcanistCommitWorkflow extends ArcanistBaseWorkflow {
 
+  private $revisionID;
+
   public function getCommandHelp() {
     return phutil_console_format(<<<EOTEXT
       **commit** [--revision __revision_id__] [--show]
@@ -48,6 +50,10 @@ EOTEXT
     return true;
   }
 
+  public function getRevisionID() {
+    return $this->revisionID;
+  }
+
   public function getArguments() {
     return array(
       'show' => array(
@@ -167,6 +173,8 @@ EOTEXT
       ));
     $mark_workflow->run();
 
+    $this->revisionID = $revision_id;
+
     return $err;
   }