Page MenuHomePhabricator

In Subversion, treat missing files similarly to conflicted files
ClosedPublic

Authored by epriestley on Jan 3 2014, 8:13 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Dec 21, 8:34 AM
Unknown Object (File)
Tue, Dec 17, 12:10 PM
Unknown Object (File)
Sun, Dec 15, 6:37 AM
Unknown Object (File)
Thu, Dec 12, 8:19 AM
Unknown Object (File)
Wed, Dec 11, 3:00 PM
Unknown Object (File)
Wed, Dec 11, 4:06 AM
Unknown Object (File)
Sat, Dec 7, 11:43 AM
Unknown Object (File)
Fri, Dec 6, 12:12 AM
Subscribers

Details

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

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

src/workflow/ArcanistBaseWorkflow.php
829–848

Particularly, this parallels these existing blocks which handle similar situations.

Also note that arc diff does not automatically execute svn add -- it prompts the user:

$ arc diff
You have untracked files in this working copy.

  Working copy: /INSECURE/repos/INIS/

  Untracked files in working copy:
    newfile

Since you don't have 'svn:ignore' rules for these files, you may have
forgotten to 'svn add' them.


    Do you want to add this file to the commit? [y/N] 

This is more common and less ambiguous than the incomplete, conflict, or missing cases: we can't reasonably do anything automatic on conflicts, incomplete is extremely rare, and missing should be rare and seems vaguely dangerous to prompt for automatic resolution.