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

Mark deleted paths as removed in committing

Test Plan: Deleted file in Git, ran `arc diff`, confirmed the question, saw the file as deleted.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4603
This commit is contained in:
vrana 2013-01-23 13:53:30 -08:00
parent 501e2b7e1d
commit d3a6e456a6
3 changed files with 13 additions and 5 deletions

View file

@ -495,7 +495,7 @@ final class ArcanistGitAPI extends ArcanistRepositoryAPI {
public function addToCommit(array $paths) {
$this->execxLocal(
'add -- %Ls',
'add -A -- %Ls',
$paths);
$this->reloadWorkingCopy();
return $this;

View file

@ -589,7 +589,7 @@ final class ArcanistMercurialAPI extends ArcanistRepositoryAPI {
public function addToCommit(array $paths) {
$this->execxLocal(
'add -- %Ls',
'addremove -- %Ls',
$paths);
$this->reloadWorkingCopy();
}

View file

@ -182,9 +182,17 @@ final class ArcanistSubversionAPI extends ArcanistRepositoryAPI {
}
public function addToCommit(array $paths) {
$this->execxLocal(
'add -- %Ls',
$paths);
$add = array_filter($paths, 'Filesystem::pathExists');
if ($add) {
$this->execxLocal(
'add -- %Ls',
$add);
}
if ($add != $paths) {
$this->execxLocal(
'delete -- %Ls',
array_diff($paths, $add));
}
}
public function getSVNProperty($path, $property) {