]> khamidou — GitHub mirrors - arcanist.git/commitdiff
make arcanist backwards compatible with various conduit versions
authorBob Trahan <bob.trahan@gmail.com>
Tue, 20 Nov 2012 01:32:09 +0000 (17:32 -0800)
committerBob Trahan <bob.trahan@gmail.com>
Tue, 20 Nov 2012 01:32:09 +0000 (17:32 -0800)
Summary: pragmatism wins the day, though I think eventually we might want something really fancy to deal with arcanist and conduit not being up to date with respect to one another

Test Plan: php -l

Reviewers: epriestley

Reviewed By: epriestley

CC: zeeg, aran, Korvin
Maniphest Tasks: T2088

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

src/workflow/ArcanistBaseWorkflow.php

index 4f091d8c3de3bc1e9769fa3455f4b6f86b0cf1f7..3e9ade257aa95125bd87ca2cf15f8b11e30c45af 100644 (file)
@@ -940,10 +940,12 @@ abstract class ArcanistBaseWorkflow {
     }
     $bundle = ArcanistBundle::newFromChanges($changes);
     $bundle->setConduit($conduit);
-    $bundle->setProjectID($diff['projectName']);
-    $bundle->setBaseRevision($diff['sourceControlBaseRevision']);
-    $bundle->setRevisionID($diff['revisionID']);
-    $bundle->setAuthor($diff['author']);
+    // since the conduit method has changes, assume that these fields
+    // could be unset
+    $bundle->setProjectID(idx($diff, 'projectName'));
+    $bundle->setBaseRevision(idx($diff, 'sourceControlBaseRevision'));
+    $bundle->setRevisionID(idx($diff, 'revisionID'));
+    $bundle->setAuthor(idx($diff, 'author'));
     return $bundle;
   }