What is the proper way to do a Subversion merge in Eclipse?

前端 未结 9 1022
深忆病人
深忆病人 2021-01-30 11:58

I\'m pretty used to how to do CVS merges in Eclipse, and I\'m otherwise happy with the way that both Subclipse and Subversive work with the SVN repository, but I\'m not quite su

9条回答
  •  说谎
    说谎 (楼主)
    2021-01-30 12:29

    Remember that with svn reverting a modified tree to a clean state is fairly easy. Simply have a clean workspace on the merge destination branch and run the merge command to import the modifications from the merge source branch, then synchronize your workspace and you will get your usual eclipse comparison window showing all the merge modified files and the conflicts.

    If for some reason you can't solve the conflicts you can svn revert on the project and go back to a clean state, otherwise you do the merge in place and once you are done you can commit. Note that you don't have to commit, once you are done handling the conflicts you can also return to the dev view, verify that the code compiles, run your unit tests, whatever and then synchronize again and commit (once the conflict are locally resolved they won't come back)

    last time I looked, when you use subclipse merge command it will overwrite the merged file (using conflict markers to show conflicting areas) and put the original left and right side of the merge in the same place. it shouldn't put anything in different directories.

    As a rule of thumb, it is best to commit all merge modifications in a single commit and to only have the merge modifications in the commit so that you can rollback the merge later if needed.

提交回复
热议问题