tags:

views:

129

answers:

3

In an really lazy moment, I updated a project by copying in and overwriting half its files with identical ones from a fork. It seems I copied in some subversion info as well as every time I try to update I get conflicting messages.

The project works well. I want to commit it exactly as is. But Tortoise SVN seems to see the older mixed up data.

What is the command to remove all existing subversion info from a project on my hard drive and force it to commit as the the working version?

+1  A: 

You could:

  • remove the .svn directory (thus removing all subversion information)
  • checkout the repository that you want your code to live in
  • copy the working code over that checkout
  • commit the lot

If you just need to have the current codebase in SVN, you could just import it after removing the .svn directory.

Hope this helps!

ylebre
Just a note that there will be a .svn directory in every subfolder. The command to get rid of them all is to right click in tortoisesvn and export it over itself.
Jim T
+4  A: 

First of all, do yourself a favour and back up what you've got before touching it any further!

Normally svn export would be the command to use to clean out the .svn dirs. You can run the command on a working copy to remove .svn dirs in-place, or you can export to a separate directory. But I couldn't say for sure whether it will work on a directory tree with "unusual" .svn directories.

TortoiseSVN can do exports too of course. Note for doing it in-place, TortoiseSVN has a trick you can do of right-click dragging a directory onto itself, and then choosing "export". The trick is you have to drag the directory onto itself in another window.

Once you have a tree without .svn dirs, do a fresh checkout somewhere else. Then, copy your previously-exported tree over the top of the checkout.

How does that sound?

Craig McQueen
Couldn't have said it better myself. :)
Mark van Lent
A: 

I would checkout the tree to another location, then compare with Beyond Compare with a filter on the subversion dirs .svn then check=in from the new tree.

Which is a lazy way of doing Criag's solution, with tools I already own.

Simeon Pilgrim
Job done. Thanks guys!
Patrick