From 56cdc314264c44cd63b40d394b2f27f91e82147e Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 12 Apr 2012 10:32:54 -0700 Subject: [PATCH] Fix some --only / --preview / SVN issues with Arcanist 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 --- .../api/subversion/ArcanistSubversionAPI.php | 2 +- src/workflow/diff/ArcanistDiffWorkflow.php | 14 ++++---------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/repository/api/subversion/ArcanistSubversionAPI.php b/src/repository/api/subversion/ArcanistSubversionAPI.php index 6c8fe232..84986d14 100644 --- a/src/repository/api/subversion/ArcanistSubversionAPI.php +++ b/src/repository/api/subversion/ArcanistSubversionAPI.php @@ -540,7 +540,7 @@ EODIFF; $results = $conduit->callMethodSynchronous( 'differential.query', $query + array( - 'arcanistProjects' => $project, + 'arcanistProjects' => array($project), )); foreach ($results as $key => $result) { diff --git a/src/workflow/diff/ArcanistDiffWorkflow.php b/src/workflow/diff/ArcanistDiffWorkflow.php index 89de96fd..6f3c698c 100644 --- a/src/workflow/diff/ArcanistDiffWorkflow.php +++ b/src/workflow/diff/ArcanistDiffWorkflow.php @@ -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(); -- 2.43.0