diff --git a/src/workflow/ArcanistFeatureWorkflow.php b/src/workflow/ArcanistFeatureWorkflow.php index b05ac4b6..008a0a54 100644 --- a/src/workflow/ArcanistFeatureWorkflow.php +++ b/src/workflow/ArcanistFeatureWorkflow.php @@ -25,18 +25,16 @@ EOTEXT public function getCommandHelp() { return phutil_console_format(<<getWorkingCopy()->getConfigFromAnySource( + 'arc.land.onto.default'); + } + $branches = $api->getAllBranches(); - if (in_array(reset($names), ipull($branches, 'name'))) { + if (in_array($name, ipull($branches, 'name'))) { list($err, $stdout, $stderr) = $api->execManualLocal( $command, - reset($names)); + $name); } if ($err) { $match = null; - if (preg_match('/^D(\d+)$/', reset($names), $match)) { + if (preg_match('/^D(\d+)$/', $name, $match)) { try { $diff = $this->getConduit()->callMethodSynchronous( 'differential.getdiff', @@ -125,10 +131,10 @@ EOTEXT )); if ($diff['branch'] != '') { - $names[0] = $diff['branch']; + $name = $diff['branch']; list($err, $stdout, $stderr) = $api->execManualLocal( $command, - reset($names)); + $name); } } catch (ConduitException $ex) { } @@ -138,22 +144,24 @@ EOTEXT if ($err) { if ($api instanceof ArcanistMercurialAPI) { $rev = ''; - if (isset($names[1])) { - $rev = csprintf('-r %s', $names[1]); + if ($start) { + $rev = csprintf('-r %s', $start); } $exec = $api->execManualLocal( 'bookmark %C %s', $rev, - $names[0]); + $name); - if (!$exec[0] && isset($names[1])) { - $api->execxLocal('update %s', $names[0]); + if (!$exec[0] && $start) { + $api->execxLocal('update %s', $name); } } else { + $startarg = $start ? csprintf('%s', $start) : ''; $exec = $api->execManualLocal( - 'checkout --track -b %Ls', - $names); + 'checkout --track -b %s %C', + $name, + $startarg); } list($err, $stdout, $stderr) = $exec;