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

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
This commit is contained in:
epriestley 2012-04-12 10:32:54 -07:00
parent 83ad377bdb
commit 56cdc31426
2 changed files with 5 additions and 11 deletions

View file

@ -540,7 +540,7 @@ EODIFF;
$results = $conduit->callMethodSynchronous( $results = $conduit->callMethodSynchronous(
'differential.query', 'differential.query',
$query + array( $query + array(
'arcanistProjects' => $project, 'arcanistProjects' => array($project),
)); ));
foreach ($results as $key => $result) { foreach ($results as $key => $result) {

View file

@ -204,12 +204,6 @@ EOTEXT
), ),
), ),
'preview' => array( 'preview' => array(
'supports' => array(
'git',
),
'nosupport' => array(
'svn' => 'Revisions are never created directly when using SVN.',
),
'help' => 'help' =>
"Instead of creating or updating a revision, only create a diff, ". "Instead of creating or updating a revision, only create a diff, ".
"which you may later attach to a revision. This still runs lint ". "which you may later attach to a revision. This still runs lint ".
@ -555,10 +549,6 @@ EOTEXT
return true; return true;
} }
if ($this->isHistoryImmutable()) {
return true;
}
return $this->getArgument('preview') || return $this->getArgument('preview') ||
$this->getArgument('only'); $this->getArgument('only');
} }
@ -1206,6 +1196,10 @@ EOTEXT
* @task message * @task message
*/ */
private function buildCommitMessage() { private function buildCommitMessage() {
if ($this->getArgument('preview') || $this->getArgument('only')) {
return null;
}
$is_create = $this->getArgument('create'); $is_create = $this->getArgument('create');
$is_update = $this->getArgument('update'); $is_update = $this->getArgument('update');
$is_raw = $this->isRawDiffSource(); $is_raw = $this->isRawDiffSource();