I have found that in such cases it is much easier to just delete the working copy and re-checkout. If you have local changes, then copy the changed files elsewhere first.
But [Can's answer][1] might work in your case, unless SVN has greater problems. Though you probably have to run it several times since it would begin at the root folder which would still have problems, then. You'd need some kind of post-order traversal in that case which can't be done with `for /r` but which can ensure that you would start with the lowest directories in the hierarchy to clean up.
You'd also need to exclude SVN's statekeeping directories .svn:
for /r /d %i in (*) do if NOT %i==.svn svn cleanup %i
As for the post-order traversal, you can build a little batch:
@echo off
call :recurse "."
goto :eof
:recurse
pushd %1
if not %~1==.svn (
for /d %%i in (*) do call :recurse "%%i"
echo svn cleanup %~1
)
popd
goto :eof
On the following tree:
<pre>
a
├───.svn
├───a1
│ └───.svn
└───a2
└───.svn
b
├───.svn
├───b1
│ ├───.svn
│ ├───b11
│ │ └───.svn
│ └───b12
│ └───.svn
└───b2
</pre>
This yields the following output:
<pre>
svn cleanup "a1"
svn cleanup "a2"
svn cleanup "a"
svn cleanup "b11"
svn cleanup "b12"
svn cleanup "b1"
svn cleanup "b2"
svn cleanup "b"
svn cleanup "."
</pre>
which, as you can see, makes sure that the lowest directories are processed first and the .svn directories are skipped. Remove the `echo` if you want to use it. This could resolve your problem. Maybe.
[1]:
[To see links please register here]