mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-26 00:32:41 +01:00
Don't require clean working copy for arc diff path
in SVN
Summary: If you are explicit then there is no need to ask you. Test Plan: $ touch a $ arc diff $ arc diff a $ arc diff existing Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4186
This commit is contained in:
parent
c7c3f6a7f1
commit
f830b3bf3f
2 changed files with 17 additions and 2 deletions
|
@ -15,6 +15,7 @@ final class ArcanistSubversionAPI extends ArcanistRepositoryAPI {
|
|||
protected $svnDiffRaw = array();
|
||||
|
||||
private $svnBaseRevisionNumber;
|
||||
private $statusPaths = array();
|
||||
|
||||
public function getSourceControlSystemName() {
|
||||
return 'svn';
|
||||
|
@ -63,9 +64,20 @@ final class ArcanistSubversionAPI extends ArcanistRepositoryAPI {
|
|||
return $this->svnBaseRevisions;
|
||||
}
|
||||
|
||||
public function limitStatusToPaths(array $paths) {
|
||||
$this->statusPaths = $paths;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getSVNStatus($with_externals = false) {
|
||||
if ($this->svnStatus === null) {
|
||||
list($status) = $this->execxLocal('--xml status');
|
||||
if ($this->statusPaths) {
|
||||
list($status) = $this->execxLocal(
|
||||
'--xml status %Ls',
|
||||
$this->statusPaths);
|
||||
} else {
|
||||
list($status) = $this->execxLocal('--xml status');
|
||||
}
|
||||
$xml = new SimpleXMLElement($status);
|
||||
|
||||
if (count($xml->target) != 1) {
|
||||
|
|
|
@ -616,6 +616,7 @@ EOTEXT
|
|||
}
|
||||
|
||||
if ($this->requiresWorkingCopy()) {
|
||||
$repository_api = $this->getRepositoryAPI();
|
||||
try {
|
||||
if ($this->getArgument('add-all')) {
|
||||
$this->setCommitMode(self::COMMIT_ENABLE);
|
||||
|
@ -624,9 +625,11 @@ EOTEXT
|
|||
} else {
|
||||
$this->setCommitMode(self::COMMIT_ALLOW);
|
||||
}
|
||||
if ($repository_api instanceof ArcanistSubversionAPI) {
|
||||
$repository_api->limitStatusToPaths($this->getArgument('paths'));
|
||||
}
|
||||
$this->requireCleanWorkingCopy();
|
||||
} catch (ArcanistUncommittedChangesException $ex) {
|
||||
$repository_api = $this->getRepositoryAPI();
|
||||
if ($repository_api instanceof ArcanistMercurialAPI) {
|
||||
|
||||
// Some Mercurial users prefer to use it like SVN, where they don't
|
||||
|
|
Loading…
Reference in a new issue