1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-29 18:22:41 +01:00

Fix arc diff in SVN with paths

Summary:
Recently, in D4097 or one of the precursors I refactored this. However, when $rev is null parseBaseCommitArgument() throws ("This VCS does not support commit ranges."). Shield the call so it only happens if if $rev is nonempty (we still want to make the call, so "arc lint --rev x" on SVN will throw and inform the user that "--rev" is incorrect usage).

(@vrana, this was reported by FB and might be worth pushing.)

Test Plan: Ran "arc diff --preview <path>". Grepped for other parseBaseCommitArgument() callsites and verified they don't have similar issues.

Reviewers: vrana, btrahan, chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D4241
This commit is contained in:
epriestley 2012-12-20 11:12:30 -08:00
parent 219dbe2374
commit ffdf44e298

View file

@ -1285,7 +1285,10 @@ abstract class ArcanistBaseWorkflow extends Phobject {
} }
} else { } else {
$repository_api = $this->getRepositoryAPI(); $repository_api = $this->getRepositoryAPI();
$this->parseBaseCommitArgument(array($rev));
if ($rev) {
$this->parseBaseCommitArgument(array($rev));
}
$paths = $repository_api->getWorkingCopyStatus(); $paths = $repository_api->getWorkingCopyStatus();
foreach ($paths as $path => $flags) { foreach ($paths as $path => $flags) {