Changeset View
Changeset View
Standalone View
Standalone View
src/browse/workflow/ArcanistBrowseWorkflow.php
Show First 20 Lines • Show All 63 Lines • ▼ Show 20 Lines | public function runWorkflow() { | ||||
if (!$targets) { | if (!$targets) { | ||||
$refs = array( | $refs = array( | ||||
new ArcanistBrowseRef(), | new ArcanistBrowseRef(), | ||||
); | ); | ||||
} else { | } else { | ||||
$refs = array(); | $refs = array(); | ||||
foreach ($targets as $target) { | foreach ($targets as $target) { | ||||
$refs[] = id(new ArcanistBrowseRef()) | $refs[] = (new ArcanistBrowseRef()) | ||||
->setToken($target); | ->setToken($target); | ||||
} | } | ||||
} | } | ||||
$is_force = $this->getArgument('force'); | $is_force = $this->getArgument('force'); | ||||
if ($is_force) { | if ($is_force) { | ||||
// TODO: Remove this completely. | // TODO: Remove this completely. | ||||
$this->writeWarn( | $this->writeWarn( | ||||
▲ Show 20 Lines • Show All 67 Lines • ▼ Show 20 Lines | if ($many_hits) { | ||||
$message = pht('Default behavior is ambiguous.'); | $message = pht('Default behavior is ambiguous.'); | ||||
} | } | ||||
$this->writeWarn(pht('AMBIGUOUS'), $message); | $this->writeWarn(pht('AMBIGUOUS'), $message); | ||||
} | } | ||||
$is_single_ref = (count($refs) == 1); | $is_single_ref = (count($refs) == 1); | ||||
$table = id(new PhutilConsoleTable()); | $table = (new PhutilConsoleTable()); | ||||
if ($is_single_ref) { | if ($is_single_ref) { | ||||
$table->addColumn('pick', array('title' => pht('Pick'))); | $table->addColumn('pick', array('title' => pht('Pick'))); | ||||
} else { | } else { | ||||
$table->addColumn('argument', array('title' => pht('Argument'))); | $table->addColumn('argument', array('title' => pht('Argument'))); | ||||
} | } | ||||
$table | $table | ||||
▲ Show 20 Lines • Show All 84 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0