I have a VS2010 solution that includes multiple projects. The folder structure looks like this:
C:\Dev\MyProduct
MyProduct.sln
UI
UI.csproj
SomeFile.cs
Model
Model.csproj
SomeModel.cs
I created a branch of the first production release of the code. It turns out I had to make a few fixes in that branch, and now want to re-integrate that branch into the trunk. I’m using TortoiseSVN to do that (I also tried AnkhSVN with similar results).
If I select the folder
C:\Dev\MyProduct
right-click and select TortoiseSVN / Merge I am guided through a wizard that allows me to select Reintegrate a branch, enter the URL of my branch, and run the merge. That results in
Neither the reintegrate source nor target can be the root of the repository
If I repeat the same steps with
C:\Dev\MyProduct\Model
the merge is successful. I guess the error message is telling me that I just can’t do that at the root level.
Questions
- Do I have any option given the current structure to merge the branch entirely, other than to select each project’s folder (there are many more than the 2 in the example) and repeat the procedure, then to repeat the procedure for each file under
C:\Dev\MyProduct? - Is it not advisable to structure SVN in this manner? If not, how should I structure things so that I have one repository per product?
You will probably want to structure your repository differently. There are two general ways you could do this:
and:
Which one you choose will depend on whether you want to branch and merge each individual project (first option), or all the projects together (second option).
If you need to move your existing project files that are sitting in the repository root into a new /trunk directory, you will need to do something like the following:
If you do it by hand, that “svn mv” line will look something like this: