Subversion and Eclipse - branching and merging with the torso

I am using v 3.4.2 Eclipse and Subversion (using svn 1.4.6 on the server) and I am having trouble understanding specific options (Depth, Ignore ancestry, etc.) and how to merge changes externally into a branch and back ...

Also, when conflicting changes are present, Subversion seems to break - in the compare editor for the conflicting file, my local file contains SVN text (e.g. <<<<<which obviously don't appear in the actual working file. If I go back to resource view, I see a whole bunch of temporary SVN files Is this a bug somewhere, or am I doing something wrong?


source to share

2 answers

Breaking, as you describe, is the standard way subversion works — when a merge results in line conflicts, SVN maintains both sides of the conflicts and puts them in the source file for viewing. You have to edit your conflicting file, examine the conflict version and repository version, and edit it so that only one set is left (remove the line <<lt; line, → →, = ==== line and any conflicting lines of code that you do not want to have). After that, right-click on the original file and select "mark as merged". after which you can commit the merged file. This is called a manual merge, and you should complete this when there are conflicts.

The temp bunch is the original source files on both sides, and should help you resolve the conflict - you should have a file ending in ".mine" which is your original clean version of the source file and a file ending in ".rXXXXX" ( where XXXX is the revision number of the subvariance), which is the original clean version of the original source file. When you "mark as merged", these files will disappear.

Eclipse has a nice graphical tool that you can use to resolve conflict with a comparison style editor, but it has some quirks and requires some practice and understanding of the tool to use it effectively. If you want to give it a try, this is available in the RMB file menu-> Team-> Edit Conflicts.



I think you will probably find that those lines <<<<< .working

appear to appear in your working copy file. This is how Subversion lets you know which parts of your text need to be manually edited due to a merge conflict.

You can read more about the merge workflow in the Resolving Conflicts section of the excellent Version Control with Subversion .



All Articles