Repro:
#!/bin/sh
URL=http://svn.apache.org/repos/asf/httpd/mod_mbox
svn co -r378000 $URL/trunk mmbxtest
touch mmbxtest/module-2.0/unversioned
svn sw -r378000 $URL/branches/surgery mmbxtest
produces error:
subversion/libsvn_wc/update_editor.c:886: (apr_err=155000)
svn: Won't delete locally modified directory 'mmbxtest'
subversion/libsvn_wc/adm_ops.c:2061: (apr_err=155012)
svn: Left locally modified or unversioned files
and leaves the WC in a broken state:
$ svn up mmbxtest
subversion/libsvn_wc/lock.c:826: (apr_err=155005)
svn: Directory 'mmbxtest/module-2.0/.svn' containing working copy admin area is
missing