From: epriestley Date: Thu, 20 Dec 2012 19:12:30 +0000 (-0800) Subject: Fix `arc diff` in SVN with paths X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=ffdf44e298bc2186e3b65c0650c27d1c04f7a89b;p=arcanist.git 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 ". 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 --- diff --git a/src/workflow/ArcanistBaseWorkflow.php b/src/workflow/ArcanistBaseWorkflow.php index 32312af2..12393f1a 100644 --- a/src/workflow/ArcanistBaseWorkflow.php +++ b/src/workflow/ArcanistBaseWorkflow.php @@ -1285,7 +1285,10 @@ abstract class ArcanistBaseWorkflow extends Phobject { } } else { $repository_api = $this->getRepositoryAPI(); - $this->parseBaseCommitArgument(array($rev)); + + if ($rev) { + $this->parseBaseCommitArgument(array($rev)); + } $paths = $repository_api->getWorkingCopyStatus(); foreach ($paths as $path => $flags) {