]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Pass conduit credentials down to children workflow
authorVihang Mehta <vihang@trifacta.com>
Mon, 8 Sep 2014 14:42:45 +0000 (07:42 -0700)
committerepriestley <git@epriestley.com>
Mon, 8 Sep 2014 14:42:46 +0000 (07:42 -0700)
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

src/workflow/ArcanistWorkflow.php

index e8a20e587a00f557d6da52dc8061a4987c4e5ed6..4bfcbd84616fa5c75cc5ec2eba4668be776f8465 100644 (file)
@@ -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) {