[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Wrong error message from 'svn remove <nonexistent>'?

From: Branko Čibej <brane_at_apache.org>
Date: Fri, 9 Nov 2018 06:38:53 +0100

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

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.