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)
Wed, Sep 18, 2:44 AM
Unknown Object (File)
Sat, Sep 14, 3:11 PM
Unknown Object (File)
Thu, Sep 12, 3:12 AM
Unknown Object (File)
Sun, Sep 8, 2:29 AM
Unknown Object (File)
Mon, Sep 2, 10:31 AM
Unknown Object (File)
Sun, Sep 1, 11:39 PM
Unknown Object (File)
Tue, Aug 27, 12:32 PM
Unknown Object (File)
Aug 17 2024, 6:35 PM
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.