mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 06:42:41 +01:00
Provide a "--conduit-uri" override for testing, and tweak some documentation.
Summary: Test Plan: Reviewers: CC:
This commit is contained in:
parent
0eecd3108f
commit
b50acb5129
5 changed files with 25 additions and 7 deletions
|
@ -31,6 +31,7 @@ phutil_require_module('arcanist', 'workingcopyidentity');
|
||||||
phutil_require_module('arcanist', 'repository/api/base');
|
phutil_require_module('arcanist', 'repository/api/base');
|
||||||
|
|
||||||
$config_trace_mode = false;
|
$config_trace_mode = false;
|
||||||
|
$force_conduit = null;
|
||||||
$args = array_slice($argv, 1);
|
$args = array_slice($argv, 1);
|
||||||
$load = array();
|
$load = array();
|
||||||
$matches = null;
|
$matches = null;
|
||||||
|
@ -46,6 +47,9 @@ foreach ($args as $key => $arg) {
|
||||||
} else if (preg_match('/^--load-phutil-library=(.*)$/', $arg, $matches)) {
|
} else if (preg_match('/^--load-phutil-library=(.*)$/', $arg, $matches)) {
|
||||||
unset($args[$key]);
|
unset($args[$key]);
|
||||||
$load['?'] = $matches[1];
|
$load['?'] = $matches[1];
|
||||||
|
} else if (preg_match('/^--conduit-uri=(.*)$/', $arg, $matches)) {
|
||||||
|
unset($args[$key]);
|
||||||
|
$force_conduit = $matches[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -135,7 +139,12 @@ try {
|
||||||
|
|
||||||
$set_guid = false;
|
$set_guid = false;
|
||||||
if ($need_conduit) {
|
if ($need_conduit) {
|
||||||
$conduit_uri = $working_copy->getConduitURI();
|
|
||||||
|
if ($force_conduit) {
|
||||||
|
$conduit_uri = $force_conduit;
|
||||||
|
} else {
|
||||||
|
$conduit_uri = $working_copy->getConduitURI();
|
||||||
|
}
|
||||||
if (!$conduit_uri) {
|
if (!$conduit_uri) {
|
||||||
throw new ArcanistUsageException(
|
throw new ArcanistUsageException(
|
||||||
"No Conduit URI is specified in the .arcconfig file for this project. ".
|
"No Conduit URI is specified in the .arcconfig file for this project. ".
|
||||||
|
|
|
@ -157,6 +157,14 @@ EOTEXT
|
||||||
__--no-ansi__
|
__--no-ansi__
|
||||||
Output in plain ASCII text only, without color or style.
|
Output in plain ASCII text only, without color or style.
|
||||||
|
|
||||||
|
__--load-phutil-library=/path/to/library__
|
||||||
|
Ignore libraries listed in .arcconfig and explicitly load specified
|
||||||
|
libraries instead. Mostly useful for Arcanist development.
|
||||||
|
|
||||||
|
__--conduit-uri=...__
|
||||||
|
Ignore configured Conduit URI and use an explicit one instead. Mostly
|
||||||
|
useful for Arcanist development.
|
||||||
|
|
||||||
|
|
||||||
EOTEXT
|
EOTEXT
|
||||||
);
|
);
|
||||||
|
|
|
@ -26,7 +26,7 @@ class ArcanistMarkCommittedWorkflow extends ArcanistBaseWorkflow {
|
||||||
to do this; arc commit (svn), arc amend (git) or commit hooks in the
|
to do this; arc commit (svn), arc amend (git) or commit hooks in the
|
||||||
master remote repository should do it for you. However, if these
|
master remote repository should do it for you. However, if these
|
||||||
mechanisms have failed for some reason you can use this command to
|
mechanisms have failed for some reason you can use this command to
|
||||||
manually change a revision status from "accepted" to "committed".
|
manually change a revision status from "Accepted" to "Committed".
|
||||||
EOTEXT
|
EOTEXT
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,6 @@ class ArcanistShellCompleteWorkflow extends ArcanistBaseWorkflow {
|
||||||
Supports: bash, etc.
|
Supports: bash, etc.
|
||||||
Implements shell completion. To use shell completion, source the
|
Implements shell completion. To use shell completion, source the
|
||||||
appropriate script from 'resources/shell/' in your .shellrc.
|
appropriate script from 'resources/shell/' in your .shellrc.
|
||||||
|
|
||||||
EOTEXT
|
EOTEXT
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -123,7 +122,7 @@ EOTEXT
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
$output = array();
|
$output = array();
|
||||||
foreach ($arguments as $argument => $spec) {
|
foreach ($arguments as $argument => $spec) {
|
||||||
if ($argument == '*') {
|
if ($argument == '*') {
|
||||||
|
@ -136,7 +135,7 @@ EOTEXT
|
||||||
}
|
}
|
||||||
$output[] = '--'.$argument;
|
$output[] = '--'.$argument;
|
||||||
}
|
}
|
||||||
|
|
||||||
$cur = idx($argv, $pos, '');
|
$cur = idx($argv, $pos, '');
|
||||||
$any_match = false;
|
$any_match = false;
|
||||||
foreach ($output as $possible) {
|
foreach ($output as $possible) {
|
||||||
|
@ -144,7 +143,7 @@ EOTEXT
|
||||||
$any_match = true;
|
$any_match = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$any_match && isset($arguments['*'])) {
|
if (!$any_match && isset($arguments['*'])) {
|
||||||
// TODO: the '*' specifier should probably have more details about
|
// TODO: the '*' specifier should probably have more details about
|
||||||
// whether or not it is a list of files. Since it almost always is in
|
// whether or not it is a list of files. Since it almost always is in
|
||||||
|
|
|
@ -22,7 +22,9 @@ class ArcanistSvnHookPreCommitWorkflow extends ArcanistBaseWorkflow {
|
||||||
return phutil_console_format(<<<EOTEXT
|
return phutil_console_format(<<<EOTEXT
|
||||||
**svn-hook-pre-commit** __repository__ __transaction__
|
**svn-hook-pre-commit** __repository__ __transaction__
|
||||||
Supports: svn
|
Supports: svn
|
||||||
You can install this as an SVN pre-commit hook.
|
You can install this as an SVN pre-commit hook. For more information,
|
||||||
|
see the article "Installing Arcanist SVN Hooks" in the Arcanist
|
||||||
|
documentation.
|
||||||
EOTEXT
|
EOTEXT
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue