1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-22 14:52:40 +01:00

Provide a "--conduit-uri" override for testing, and tweak some documentation.

Summary:

Test Plan:

Reviewers:

CC:
This commit is contained in:
epriestley 2011-02-18 22:17:41 -08:00
parent 0eecd3108f
commit b50acb5129
5 changed files with 25 additions and 7 deletions

View file

@ -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. ".

View file

@ -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
); );

View file

@ -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
); );
} }

View file

@ -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
); );
} }

View file

@ -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
); );
} }