mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-26 16: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:
parent
501e2b7e1d
commit
d3a6e456a6
3 changed files with 13 additions and 5 deletions
|
@ -495,7 +495,7 @@ final class ArcanistGitAPI extends ArcanistRepositoryAPI {
|
||||||
|
|
||||||
public function addToCommit(array $paths) {
|
public function addToCommit(array $paths) {
|
||||||
$this->execxLocal(
|
$this->execxLocal(
|
||||||
'add -- %Ls',
|
'add -A -- %Ls',
|
||||||
$paths);
|
$paths);
|
||||||
$this->reloadWorkingCopy();
|
$this->reloadWorkingCopy();
|
||||||
return $this;
|
return $this;
|
||||||
|
|
|
@ -589,7 +589,7 @@ final class ArcanistMercurialAPI extends ArcanistRepositoryAPI {
|
||||||
|
|
||||||
public function addToCommit(array $paths) {
|
public function addToCommit(array $paths) {
|
||||||
$this->execxLocal(
|
$this->execxLocal(
|
||||||
'add -- %Ls',
|
'addremove -- %Ls',
|
||||||
$paths);
|
$paths);
|
||||||
$this->reloadWorkingCopy();
|
$this->reloadWorkingCopy();
|
||||||
}
|
}
|
||||||
|
|
|
@ -182,9 +182,17 @@ final class ArcanistSubversionAPI extends ArcanistRepositoryAPI {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addToCommit(array $paths) {
|
public function addToCommit(array $paths) {
|
||||||
$this->execxLocal(
|
$add = array_filter($paths, 'Filesystem::pathExists');
|
||||||
'add -- %Ls',
|
if ($add) {
|
||||||
$paths);
|
$this->execxLocal(
|
||||||
|
'add -- %Ls',
|
||||||
|
$add);
|
||||||
|
}
|
||||||
|
if ($add != $paths) {
|
||||||
|
$this->execxLocal(
|
||||||
|
'delete -- %Ls',
|
||||||
|
array_diff($paths, $add));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getSVNProperty($path, $property) {
|
public function getSVNProperty($path, $property) {
|
||||||
|
|
Loading…
Reference in a new issue