views:

73

answers:

1

Unfortunately, I'm not entirely clear on how SVN works...

I have a trunk for my main Visual Studio C# solution, and a branch, for work in development. Now and again, something needs to be changed in both, so that the code is identical. I've had a look at the Merge wizard, but it doesn't seem to describe this issue. It seems to allow me to merge specific revision numbers, which may contain changes to other files, rather than considering the merge on a per-file basis.

How do I do this?

A: 

It is possible to run "Merge" command on the file. You need to make sure that "Merge From" value points to the file in the right branch (i.e. to the file that has the changes you want to get). You will notice that the merge wizard will list all the revisions for that file. You can now select revision(s) (which may contain changes to other files) safely since only the changes to your file will be merged into your working copy.

Remember to build/test your working copy after the merge, and then to commit the changes back to repository.

You can also take advantage of the "Merge Tracking" feature (available in SVN 1.5+) by selecting the "all eligible revisions" option.

I recommend to configure AnkhSVN to use an external merge tool (via Tools > Options > Source Control > Subversion User Tools in Visual Studio).

BBb