]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Fix some --only / --preview / SVN issues with Arcanist
authorepriestley <git@epriestley.com>
Thu, 12 Apr 2012 17:32:54 +0000 (10:32 -0700)
committerepriestley <git@epriestley.com>
Thu, 12 Apr 2012 17:32:54 +0000 (10:32 -0700)
Summary:
  - Historically, "--preview" was forbidden under SVN. No reason for that now.
  - The "--auto" patch moved the "--preview" / "--only" checks later than they should be.
  - Fix an issue with Conduit query construction in SVN.

Test Plan: Ran "arc diff --preview" in an SVN working copy. Ran "arc diff" in an SVN working copy.

Reviewers: svemir, btrahan, vrana, jungejason

Reviewed By: svemir

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

src/repository/api/subversion/ArcanistSubversionAPI.php
src/workflow/diff/ArcanistDiffWorkflow.php

index 6c8fe232715a040d6768ea5104e068225616a870..84986d1471d3995c106380311b4e2b5df55fa3be 100644 (file)
@@ -540,7 +540,7 @@ EODIFF;
     $results = $conduit->callMethodSynchronous(
       'differential.query',
       $query + array(
-        'arcanistProjects' => $project,
+        'arcanistProjects' => array($project),
       ));
 
     foreach ($results as $key => $result) {
index 89de96fd41b2e76b29e7fd05549fd4b0b69424c4..6f3c698cadcde9bf9183512348a9c5def97beaaa 100644 (file)
@@ -204,12 +204,6 @@ EOTEXT
         ),
       ),
       'preview' => array(
-        'supports'    => array(
-          'git',
-        ),
-        'nosupport'   => array(
-          'svn' => 'Revisions are never created directly when using SVN.',
-        ),
         'help' =>
           "Instead of creating or updating a revision, only create a diff, ".
           "which you may later attach to a revision. This still runs lint ".
@@ -555,10 +549,6 @@ EOTEXT
       return true;
     }
 
-    if ($this->isHistoryImmutable()) {
-      return true;
-    }
-
     return $this->getArgument('preview') ||
            $this->getArgument('only');
   }
@@ -1206,6 +1196,10 @@ EOTEXT
    * @task message
    */
   private function buildCommitMessage() {
+    if ($this->getArgument('preview') || $this->getArgument('only')) {
+      return null;
+    }
+
     $is_create = $this->getArgument('create');
     $is_update = $this->getArgument('update');
     $is_raw = $this->isRawDiffSource();