svn branch merge tree conflict issue (using tortoise)
来源:互联网 发布:爱宕 犬 数据 编辑:程序博客网 时间:2024/06/08 16:00
http://stackoverflow.com/questions/16367990/svn-branch-merge-tree-conflict-issue-using-tortoise
I have read a lot and lot on this but couldn't figure out what theissue is, and it's pretty weird. I am using version 1.7 for serverand latest tortoise version (1.7) for the client. Here's thescenario:
- I created a parent branch, and then created 1 child branch from it.So, PARENT_BRANCH -> CHILD_BRANCH
- Add a new directory in CHILD_BRANCH and commit.
- Using tortoise merge all changes from CHILD_BRANCH toPARENT_BRANCH. I used 'merge a range of revisions' option anddidn't specify any revisions in the option, so basically let svnidentify and manage the revisions to merge.
- After the merge, the new directory is created inPARENT_BRANCH.
- Merge back from PARENT_BRANCH -> CHILD_BRANCH.
- I get tree conflict on the new directory, with the error that thedirectory its trying to add is already there.
Well, of course the directory is there in child branch as that'swhere it originally came from. I though that svn 1.5+ tracks mergesusing merge-info, and should have known this is the branch fromwhere the directory came and should not throw the tree mergeerror.
Any idea what's going on and how can I fix this? The example I gaveis just for 1 directory, but in reality there are lots ofdirectories and files, so going one by one manually takeshours.
Answer:
The problem is that both CHILD and PARENT have different revisionswhich added the same folder. CHILD doesn't have any knowledge ofthe revision in your step 4.
Immediately after every merge from CHILD to PARENT (your step 4.)you need to record against CHILD that it has the revision of themerge from CHILD to PARENT. You do this by merging that revision inPARENT to CHILD and checking this flag in tortoisesvn:
Have a read of this post on
Thanks forthe response. So if I understand it correctly, if let's say whilemerging from CHILD->PARENT, svn identifies r100-r200 will betaken and merged from CHILD. Post merge, when I commit, lets say itwas revision r201. So, now I have to tell CHILD to record r201 as"record only" so that when I merge back from PARENT->CHILD, thisparticular revision will be ignored and I should not get any treeconflicts arising because of CHILD->PARENT->CHILD merge. It'sreally strange, since svn should know that already as to whichbranch originated the create directory command in the firstplace.
注:1、实际情况:从branchmerge到trunk,一切正常。然后ranch改了点东西,再merge到trunk,很多文件都报treeconflict了。
2、Tomerge a branch
svn merge --reintegrate
, as you would normally.(=>r
M
)svn merge --record-only -c M ^/
.Notethe record-only
option.
Step 2 essentially tells the topic branch to consider the mergecommit (revision M
,from step 1) part of its history. This merge-revision is the onethat usually causes problems during reintegration; svn tries toundo
So, repeated reintegration works,
I eventually found this solution throughan
The only broad downside (as per an svnlog -g
output is messy. I guess this is the risk.
- svn branch merge tree conflict issue (using tortoise)
- svn branch、tag & merge
- svn merge和branch
- svn merge和branch
- svn merge和branch
- svn merge和branch
- svn merge和branch
- svn merge和branch
- svn merge和branch
- svn merge和branch
- svn merge和branch
- SVN branch merge
- SVN merge和branch
- svn merge branch
- svn merge和branch
- svn merge和branch
- svn merge和branch
- svn merge和branch
- Optimizing Graphics Performance-Unity图形性能优化
- wordpress出现数据库连接错误解决方案
- 模拟器 INSTALL_FAILED_CONTAINER_ERROR
- C#中的委托和事件
- 【No8.】Java汉字转换为拼音
- svn branch merge tree conflict issue (using tortoise)
- hdu4973 A simple simulation problem. 线段树
- Unity3D里的碰撞检测
- 腾讯游戏分享汇:天天飞车六大研发经验
- Occlusion Culling-Unity
- Draw Call Batching
- 用例中的前置条件和后置条件
- 46 Tips & Tricks for 2D mobile Performance in Unity
- Custom Editor losing settings on Play