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:
parent
219dbe2374
commit
ffdf44e298
1 changed files with 4 additions and 1 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue