views:

79

answers:

1

How are you using svnmerge for merging and branching in svn?

+6  A: 

If you are seing the merge-left/right/working files then it means that there's been a conflict in a merge you've tried to apply. This means that the same section of code has been changed in different ways on the source branch (the branch you've merged from) and the destination branch (the branch you're merging to). The left file shows what was in the source branch, the right file shows what was in the destination branch, and the working file shows SVNs attempts to merge both into your current working copy.

See the SVN Book for more information on conflicts. To resolve them you need to look at the left and right files and work out how best to combine the conflicting changes. If you have an SVN GUI such as TortoiseSVN or SmartSVN then you should be able to open the client's conflict viewer. I'd highly recommend that over trying to do it from the raw text files. If you're an emacs user than ediff is great for resolving conflicts too.

Once you're happy with the change then you need to mark the file as 'resolved' in SVN, which allows you to check the file in.

the_mandrill
+1 for the advice on using a GUI tool to reconcile merges.
APC
I'd also recommend Araxis Merge as a very good commercial merge tool. Winmerge is pretty decent as a free tool.
the_mandrill