1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-25 08:12:40 +01:00

Add --skip-arcconfig option

Summary:
Continuation of D4732 - when we don't care about loading an arcconfig,
allow that to be specified.

Test Plan: chmod -r .arcconfig; bin/arc help --skip-arcconfig

Reviewers: epriestley, vrana

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4750
This commit is contained in:
Nick Harper 2013-01-30 16:26:41 -08:00
parent 3f747be644
commit dff1342efc
2 changed files with 14 additions and 1 deletions

View file

@ -18,6 +18,9 @@ $args->parsePartial(
'help' => 'Load a libphutil library.',
'repeat' => true,
),
array(
'name' => 'skip-arcconfig',
),
array(
'name' => 'conduit-uri',
'param' => 'uri',
@ -40,6 +43,7 @@ $config_trace_mode = $args->getArg('trace');
$force_conduit = $args->getArg('conduit-uri');
$force_conduit_version = $args->getArg('conduit-version');
$conduit_timeout = $args->getArg('conduit-timeout');
$skip_arcconfig = $args->getArg('skip-arcconfig');
$load = $args->getArg('load-phutil-library');
$help = $args->getArg('help');
@ -72,7 +76,12 @@ try {
$global_config = ArcanistBaseWorkflow::readGlobalArcConfig();
$system_config = ArcanistBaseWorkflow::readSystemArcConfig();
$working_copy = ArcanistWorkingCopyIdentity::newFromPath($working_directory);
if ($skip_arcconfig) {
$working_copy = ArcanistWorkingCopyIdentity::newDummyWorkingCopy();
} else {
$working_copy =
ArcanistWorkingCopyIdentity::newFromPath($working_directory);
}
reenter_if_this_is_arcanist_or_libphutil(
$console,

View file

@ -14,6 +14,10 @@ final class ArcanistWorkingCopyIdentity {
protected $projectConfig;
protected $projectRoot;
public static function newDummyWorkingCopy() {
return new ArcanistWorkingCopyIdentity('/', array());
}
public static function newFromPath($path) {
$project_id = null;
$project_root = null;