How to move a subproject to a new folder in Visual Studio 2008 without breaking (ankhsvn) subversion revision history?

StackOverflow https://stackoverflow.com/questions/1409392

  •  05-07-2019
  •  | 
  •  

Question

I have a c# solution with a bunch of projects. One of them resides in a folder that does not match the project name (for reasons I can't know since the guy who did it left before I arrived). My beloved ReSharper plugin goes all grumpy on me and draws blue swiggly lines under the namespace declarations and groans: "Namespace does not correspond to file location, should be..." And I agree. But the file location is wrong, not the namespace.

How can do I change the folder name of the project without breaking subversion integration and whatnot? I'm using the AnkhSvn pluging, but also have TortoiseSVN installed and would be comfortable to use either as long as the solution stays sane.

Any tips?

Was it helpful?

Solution

In TortoiseSVN you have a function to move versioned items. If you drag the folder using the right mouse button to the location where you want to move it, you will get a menu when you drop it with several options using SVN methods of moving or exporting it. Then SVN will have control on what's happening.

Edit: In your case, you might just want to rename the folder using Right click: TortoiseSVN->Rename...

OTHER TIPS

Just rename the folder. This should work in all cases except for case-only changes and AnkhSVN will handle the hard work.

For this last category you can rename to a different name, commit... update all working copies (e.g. wait a day).. and then rename to the final name. (Case only renames are not supported by Subversion)

It looks like Subversion 1.7 will support case only renames, but it will take some time for that to be released.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top