1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-26 00:32:41 +01:00

In Subversion, treat missing files similarly to conflicted files

Summary: See <https://github.com/facebook/arcanist/issues/133>. Treat "!" files like "C" and "?" files and make the user deal with them.

Test Plan:
  >>> orbital ~/repos/INIS $ svn st
  !       README
  >>> orbital ~/repos/INIS $ arc diff
  Usage Exception: You have missing files in this working copy. Revert or formally remove them (with `svn rm`) before proceeding.

    Working copy: /INSECURE/repos/INIS/

    Missing files in working copy:
      README

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D7886
This commit is contained in:
epriestley 2014-01-03 12:23:34 -08:00
parent 760385ea01
commit 488b8e365a
2 changed files with 20 additions and 0 deletions

View file

@ -184,6 +184,14 @@ abstract class ArcanistRepositoryAPI {
} }
/**
* @task status
*/
final public function getMissingChanges() {
return $this->getUncommittedPathsWithMask(self::FLAG_MISSING);
}
/** /**
* @task status * @task status
*/ */

View file

@ -847,6 +847,18 @@ abstract class ArcanistBaseWorkflow extends Phobject {
" ".implode("\n ", $conflicts)."\n"); " ".implode("\n ", $conflicts)."\n");
} }
$missing = $api->getMissingChanges();
if ($missing) {
throw new ArcanistUsageException(
pht(
"You have missing files in this working copy. Revert or formally ".
"remove them (with `svn rm`) before proceeding.\n\n".
"%s".
" Missing files in working copy:\n%s\n",
$working_copy_desc,
" ".implode("\n ", $missing)));
}
$unstaged = $api->getUnstagedChanges(); $unstaged = $api->getUnstagedChanges();
if ($unstaged) { if ($unstaged) {
echo "You have unstaged changes in this working copy.\n\n". echo "You have unstaged changes in this working copy.\n\n".