]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Provide a "--conduit-uri" override for testing, and tweak some documentation.
authorepriestley <epriestley@phabricator.com>
Sat, 19 Feb 2011 06:17:41 +0000 (22:17 -0800)
committerepriestley <epriestley@phabricator.com>
Sat, 19 Feb 2011 06:17:41 +0000 (22:17 -0800)
Summary:

Test Plan:

Reviewers:

CC:

scripts/arcanist.php
src/workflow/help/ArcanistHelpWorkflow.php
src/workflow/mark-committed/ArcanistMarkCommittedWorkflow.php
src/workflow/shell-complete/ArcanistShellCompleteWorkflow.php
src/workflow/svn-hook-pre-commit/ArcanistSvnHookPreCommitWorkflow.php

index 83eebff29d98d6a0b62464fd7dad1abfa5ace4e1..b4de5327f8ac99005a6b2d75c7bd03fb13a19930 100755 (executable)
@@ -31,6 +31,7 @@ phutil_require_module('arcanist', 'workingcopyidentity');
 phutil_require_module('arcanist', 'repository/api/base');
 
 $config_trace_mode = false;
+$force_conduit = null;
 $args = array_slice($argv, 1);
 $load = array();
 $matches = null;
@@ -46,6 +47,9 @@ foreach ($args as $key => $arg) {
   } else if (preg_match('/^--load-phutil-library=(.*)$/', $arg, $matches)) {
     unset($args[$key]);
     $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;
   if ($need_conduit) {
-    $conduit_uri  = $working_copy->getConduitURI();
+
+    if ($force_conduit) {
+      $conduit_uri = $force_conduit;
+    } else {
+      $conduit_uri = $working_copy->getConduitURI();
+    }
     if (!$conduit_uri) {
       throw new ArcanistUsageException(
         "No Conduit URI is specified in the .arcconfig file for this project. ".
index 4427610d64a44200ae3c2e76568a87eab149bcf0..7ebb9ac363f101489406b1a6afb0765b93f49fba 100644 (file)
@@ -157,6 +157,14 @@ EOTEXT
       __--no-ansi__
           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
     );
index 97197541c9a4207ef51835ba8ad9589f25713cb2..6aa64a537ea777a9815575fa92420f1e454ae547 100644 (file)
@@ -26,7 +26,7 @@ class ArcanistMarkCommittedWorkflow extends ArcanistBaseWorkflow {
           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
           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
       );
   }
index 9ce06663e21012b429458ff462feee64ca68534b..b2973752d7b16c3b7ee89b1aa356112f2c1b940e 100644 (file)
@@ -24,7 +24,6 @@ class ArcanistShellCompleteWorkflow extends ArcanistBaseWorkflow {
           Supports: bash, etc.
           Implements shell completion. To use shell completion, source the
           appropriate script from 'resources/shell/' in your .shellrc.
-
 EOTEXT
       );
   }
@@ -123,7 +122,7 @@ EOTEXT
         }
         return 0;
       } else {
-        
+
         $output = array();
         foreach ($arguments as $argument => $spec) {
           if ($argument == '*') {
@@ -136,7 +135,7 @@ EOTEXT
           }
           $output[] = '--'.$argument;
         }
-        
+
         $cur = idx($argv, $pos, '');
         $any_match = false;
         foreach ($output as $possible) {
@@ -144,7 +143,7 @@ EOTEXT
             $any_match = true;
           }
         }
-        
+
         if (!$any_match && isset($arguments['*'])) {
           // TODO: the '*' specifier should probably have more details about
           // whether or not it is a list of files. Since it almost always is in
index 23f85133e52f7ef6efe4e6c66bdfbc9a9215a2ec..398920f654ab0fcf96bbed92c9352705521f5da0 100644 (file)
@@ -22,7 +22,9 @@ class ArcanistSvnHookPreCommitWorkflow extends ArcanistBaseWorkflow {
     return phutil_console_format(<<<EOTEXT
       **svn-hook-pre-commit** __repository__ __transaction__
           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
       );
   }