From: Bob Trahan Date: Tue, 20 Nov 2012 01:32:09 +0000 (-0800) Subject: make arcanist backwards compatible with various conduit versions X-Git-Tag: conduit-6~20 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=b71666a24a0bbc281cfc5ef894d5b44ad17d4a97;p=arcanist.git make arcanist backwards compatible with various conduit versions 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 --- diff --git a/src/workflow/ArcanistBaseWorkflow.php b/src/workflow/ArcanistBaseWorkflow.php index 4f091d8c..3e9ade25 100644 --- a/src/workflow/ArcanistBaseWorkflow.php +++ b/src/workflow/ArcanistBaseWorkflow.php @@ -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; }