开发者

Merging subversion

I have one main line and a branch. There are changes made on main line and also in branch. Now I need to make su开发者_JS百科re all the changes made on branch are moved to main line. Since there are changes made in main line as well, what is the best way to merge changes (from branch to main line)? Is there a way to see the difference of the two files (Main to branch) and then do the merge?

I'm using Tortoise SVN.

Thanks


Do a merge with Tortoise, from the branch into the mainline, and unless there are conflicts (contrary changes very close to each other), it'll handle it. The repo hasn't changed yet, it's just a local merge. So now you commit the changes. Preview the commit to see what you're actually changing. If you like it, great. Now do the same from the mainline into the branch. Now you should be in sync. If you have conflicts, you'll have to edit the conflict (right within tortoise) to pick and choose which lines you want.


SVN will create merge conflicts which you can then resolve with a merge tool of your choice (on Windows e.g. WinMerge). It'll show you changes that were made in both files. You usually need to merge them manually (with the help of the merge tool). Once you finished merging you commit the merged files into trunk.


If you right-click on a folder and choose Merge, you can choose to Reintegrate a branch, or to Merge two different trees, which may be more what you're looking for.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜