From: Vihang Mehta Date: Mon, 8 Sep 2014 14:42:45 +0000 (-0700) Subject: Pass conduit credentials down to children workflow X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=1b8ce98304f5c960f538e71c919ce040e61a61e3;p=arcanist.git Pass conduit credentials down to children workflow Summary: Calling `arc patch` on a diff that's dependent on a different diff tries to patch the parent first. To patch the parent a child workflow is created, and a conduit is passed down, but the credentials are not and it is not marked as authenticated. Then when the child tries to get the commit message for the dependency, it checks isConduitAuthenticated() https://secure.phabricator.com/diffusion/ARC/browse/master/src/workflow/ArcanistPatchWorkflow.php;2c3268f03ed70d3221eb1642bIc99ebb39b12902e$800 and on failure pops up an interactive editor for the commit message. Instead we just pass down the credentials to the childred and mark them as authenticated, so this is not a problem. Test Plan: With two diffs where DA2 depends on DA1, run `arc patch --force --nobranch DA2` ... this no longer pops an interactive editor for the commit message for the dependency. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: hach-que, seshness, epriestley, Korvin Maniphest Tasks: T5986 Differential Revision: https://secure.phabricator.com/D10381 --- diff --git a/src/workflow/ArcanistWorkflow.php b/src/workflow/ArcanistWorkflow.php index e8a20e58..4bfcbd84 100644 --- a/src/workflow/ArcanistWorkflow.php +++ b/src/workflow/ArcanistWorkflow.php @@ -575,6 +575,8 @@ abstract class ArcanistWorkflow extends Phobject { if ($this->conduit) { $workflow->conduit = $this->conduit; + $workflow->setConduitCredentials($this->conduitCredentials); + $workflow->conduitAuthenticated = $this->conduitAuthenticated; } if ($this->workingCopy) {