]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Allow the "arc land --onto" default to be read from user config
authorepriestley <git@epriestley.com>
Wed, 20 Jun 2012 19:29:07 +0000 (12:29 -0700)
committerepriestley <git@epriestley.com>
Wed, 20 Jun 2012 19:29:07 +0000 (12:29 -0700)
Summary: Allow the default to be set in global config, not just project config.

Test Plan: `arc set-config arc.land.onto.default derp; arc land`

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran
Differential Revision: https://secure.phabricator.com/D2686

src/workflow/ArcanistLandWorkflow.php
src/workflow/ArcanistSetConfigWorkflow.php

index bd7e8b65a0eca5ed27ad018d625b80d2ef6f9f15..e2b1009e782863e635d32bd3b3f2858a37d109a7 100644 (file)
@@ -70,7 +70,8 @@ EOTEXT
         'param' => 'master',
         'help' => "Land feature branch onto a branch other than ".
                   "'master' (default). You can change the default by setting ".
-                  "'arc.land.onto.default' in your .arcconfig.",
+                  "'arc.land.onto.default' with `arc set-config` or for the ".
+                  "entire project in .arcconfig.",
       ),
       'hold' => array(
         'help' => "Prepare the change to be pushed, but do not actually ".
@@ -135,7 +136,7 @@ EOTEXT
     $branch = head($branch);
 
     $onto_default = nonempty(
-      $this->getWorkingCopy()->getConfig('arc.land.onto.default'),
+      $this->getWorkingCopy()->getConfigFromAnySource('arc.land.onto.default'),
       'master');
 
     $remote = $this->getArgument('remote', 'origin');
index fcc7cee89c1ecf563891e7da26cdb6a026e3104a..fab9140426403ea4685dc45a8734981bff233dfe 100644 (file)
@@ -159,6 +159,12 @@ EOTEXT
           'engine is specified by the current project.',
         'example' => 'ExampleUnitTestEngine',
       ),
+      'arc.land.onto.default' => array(
+        'help' =>
+          'The name of the default branch to land changes onto when '.
+          '`arc land` is run.',
+        'example' => 'develop',
+      ),
     );
 
     $config = self::readGlobalArcConfig();