Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Design Pattern & UML  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 用subversion在做rebase是的疑问?
dissip

BigCat



发贴: 240
积分: 60
于 2006-03-13 19:58 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
如图所示:
create branch (@2)from trunk(@1)
rebase from trunk to branch 2 times(from@3 to @5 and from @6 to @8)
finally when i want to merge the change from branch(@9 ) to trunk (@10)
how to do it in subversion.

it seems because subversion treat branch as copy, rebasing will always cause collision when finally try to merge branch to trunk.
Is that true? any better solutions than just merge and solve conflict for all files?

trunk    1-------->3------->6---10
            |cp      |rb      |rb     ^
            v         v         v       |merge
branch    2-->4-->5->7-->8-->9


dissip edited on 2006-03-13 20:04

To live is to fight.

作者 Re:用subversion在做rebase是的疑问? [Re:dissip]
floater

Java Jedi

总版主


发贴: 3233
积分: 421
于 2006-03-26 11:58 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
I am not aware of. If the conflicts happen more often, we should think about the code entangling at the design level(facing code and facing requirement sides), need to seperate responsibilities further. In my exp, it usually happens a couple of times a year.

Another entirely different approach is branch-and-die, i.e., never merge back from official/release versions. Usually, this is for highly incompatible versions.

I've worked in different companies with different version control stategies, merge vs die, or layout on top of the head of branch. It works, but not perfect.

I think/believe the ultimate solution is to have a change control system on top of version controls, such as clear quest/sablime/testtrack, etc. So you can have a precise image of the source code base(branch/head are just particular examples of a snapshot of the base) because we have to controls over the changes(via change requests, or CRs in short).

A CR system normally handles conflict better than at the SCCS level because it brings in all related parties together. It doesn't eliminate the conflicts, but with all related parties, it should be handled gracefully. Of course, the price to pay is the extra system.

my two cents



"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
- Martin Fowler, Refactoring - Improving the Design of Existing Code
作者 Re:用subversion在做rebase是的疑问? [Re:dissip]
dissip

BigCat



发贴: 240
积分: 60
于 2006-03-27 16:52 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
3x for your comments. but

in my rebase diagram:
at point 5(after rebase 1), code changes in trunk(from 1->3) are merged.
at point 8(after rebase 2), code changes in trunk(from 3->6) are merged.
at point 9, when i try to merge all changes on branch to trunk, it's hard for me to distinguish which change is made on branch(this is what we need to merge) and which come from trunk by previous rebase(already have on trunk).
So i compare the diff from point 9 to point 2, and merge the diff to trunk. this will cause the changes that's rebased from trunk to be merge back to trunk again. it will cause collision.



To live is to fight.

作者 Re:用subversion在做rebase是的疑问? [Re:dissip]
floater

Java Jedi

总版主


发贴: 3233
积分: 421
于 2006-03-28 00:16 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
My guess is that you should compare the diff between 6 and 9, rather than 2 and 9.


"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
- Martin Fowler, Refactoring - Improving the Design of Existing Code

flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923