While writing some more peg revision parsing tests, I came across this
inconsistency:
$ rm -fr repo wc
$ svnadmin create repo
$ svn co file://$(pwd)/repo wc
Checked out revision 0.
$ svn add wc/foo
svn: warning: W155010: '.../wc/foo' not found
svn: E200009: Could not add all targets because some targets don't exist
svn: E200009: Illegal target for the requested operation
$ svn rm wc/foo
svn: E200005: Use --force to override this restriction (local modifications may be lost)
svn: E200005: '.../wc/foo' is not under version control
Notice that trying to add a nonexistent file, we tell the user that it
doesn't exist. But trying to delete it, we extemporize about it not
being under version control — that part is OK, I expect it's coming from
checking the working copy database — but then we tell the user to use
--force as if the file actually exists on disk.
This seems like quite silly thing to do. Second of all, 'svn remove'
should really not allow removing unversioned suff from the working copy;
there's plain 'rm' for that. But first of all, if the target doesn't
exist, 'svn remove' should issue the same W155010 warning instead of
mumbling something about lost local modifications.
To summarize, I'd have expected to see something like this instead:
$ svn rm wc/foo
svn: warning: W155010: '.../wc/foo' not found
svn: E200005: '.../wc/foo' is not under version control
-- Brane
Received on 2018-11-09 06:39:05 CET