Thursday, April 30, 2015

What to do when SVN cleanup fails

I ran into an issue with TortoiseSVN earlier this week, where the regular cleanup didn't finish correctly anymore, so I had to resort to other methods. Searching for a solution I came up with several possible solutions.

Found at StackOverflow:
  1. Delete the .svn directory for your working copy.
  2. Start a new checkout in a new, temporary directory.
  3. Cancel the checkout (we don't want to wait for everything to get pulled down).
  4. Run a cleanup on this cancelled checkout.
  5. Now we have a new .svn directory with a clean database (although no/few files)
  6. Copy this .svn into your old, corrupted working directory.
  7. Run svn update and it should bring your new partial .svn directory up to speed with your old working directory.

That's all a little confusing, process wise. Essentially, what we're doing is deleting the corrupt .svn then creating a new .svn for the same checkout path. We then move this new .svn to our old working directory and update it to the repository.

However, this morning the above solution also didn't work and I resorted to the following steps (a similar solution found at SO):
  1. Move the affected subdirectory out of the working copy. Move it somewhere else so it becomes invisible to SVN
  2. SVN cleanup at the root
  3. SVN update, which will recreate a clean subdirectory, with all the correct permissions.
  4. Manually merge any changes to the subdirectory's files (copy the files affected) from the previously moved version. Do NOT copy back in any of the .svn control area.

3 comments:

Thanks for taking the time to provide feedback!

Cheers,
Nicky

Featured Post

Microsoft Ignite 2024 - My Key Highlights

Last week was the annual Microsoft Ignite conference in Chicago. In this blog, I will take you through my most important highlights of the ...