]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Temporarily unrequire defining getWorkflowName()
authorvrana <jakubv@fb.com>
Fri, 19 Oct 2012 17:38:34 +0000 (10:38 -0700)
committervrana <jakubv@fb.com>
Fri, 19 Oct 2012 18:02:20 +0000 (11:02 -0700)
Summary:
We need to run new Arcanist over old code in Perflab.
We also need to run new Arcanist over new code (with already deleted custom `buildAllWorkflows()`).

This will work because old code overwrites `buildAllWorkflows()`.

Test Plan:
  $ arc help
  $ arc help # after deleting getWorkflowName() from one workflow

Reviewers: edward, epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3741

src/configuration/ArcanistConfiguration.php
src/workflow/ArcanistBaseWorkflow.php

index be5c89215aa5d45d6321be40789716a927b0a0ee..696b8e775efc4c5b07fe1128926e4d7bf14992be 100644 (file)
@@ -58,6 +58,13 @@ class ArcanistConfiguration {
     foreach ($symbols as $symbol) {
       $class = $symbol['name'];
       $workflow = newv($class, array());
+
+      // TODO: Delete after installations will update (2012-10-31).
+      if (!method_exists($workflow, 'getWorkflowName')) {
+        // This workflow was hopefully already built by our parent.
+        continue;
+      }
+
       $name = $workflow->getWorkflowName();
 
       if (isset($workflows[$name])) {
index 2dc793e0516b31373e4bdaff0d11417deea7cbdb..943b962661349adb242de43897bdc8d6c8ef9ca6 100644 (file)
@@ -89,7 +89,8 @@ abstract class ArcanistBaseWorkflow {
    *
    * @return string   The command a user types to invoke this workflow.
    */
-  abstract public function getWorkflowName();
+  // TODO: Uncomment after installations will update (2012-10-31).
+  // abstract public function getWorkflowName();
 
   /**
    * Return console formatted string with all command synopses.