svnadmin create repo
svn mkdir file://`pwd`/repo/foo -m r1
svn rm file://`pwd`/repo/foo -m r2
svn co file://`pwd`/repo wc
svn cp -r1 file://`pwd`/repo/foo wc/foo
The copy fails with
../svn/subversion/libsvn_wc/lock.c:155: (apr_err=155004)
svn: Attempted to lock an already-locked dir
svn: Working copy 'wc' locked
svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)
If the target name is different from the original the copy succeeds.
svn cp -r1 file://`pwd`/repo/foo wc/bar
A wc/bar
The copy also succeeds if foo is a file rather than a directory.