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
F14035727: D7886.diff
Sun, Nov 10, 7:18 AM
F14015913: D7886.diff
Mon, Nov 4, 2:41 AM
F13955926: D7886.id.diff
Mon, Oct 14, 3:35 AM
Unknown Object (File)
Fri, Oct 11, 11:54 AM
Unknown Object (File)
Sep 30 2024, 1:50 PM
Unknown Object (File)
Sep 22 2024, 5:15 AM
Unknown Object (File)
Sep 21 2024, 2:44 PM
Unknown Object (File)
Sep 21 2024, 8:16 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

Branch
missing
Lint
Lint Passed
Unit
Tests Passed

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.