[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: how to avoid text and tree conflict

From: su heng <ste.suheng_at_gmail.com>
Date: Tue, 05 Apr 2011 01:48:49 +0800

On Mon, 2011-04-04 at 10:26 -0400, Bob Archer wrote:
> > I read the SVN book, as there are three type conflicts: text,
> > tree and
> > properties conflict. However, I wanna know why it is a conflict.
> > For
> > example, if there is a text conflict when I do merging code, I just
> > know
> > there is an conflict but don't know why it is a conflict.
>
> It is a conflict because two people changed the same line of code. So, the software can't know which line of code you want to remain after it merges them... you have to tell it. You could choose one line, the other line, or even combine them in some way.
>
> BOb
>
>
>
> >
> > So could u provide me some resource or hints what are the judge
> > rules
> > for SVN to address it is a conflict, in this case, I can avoid more
> > conflict when I'm coding or merging. I concert the text and tree
> > conflict more.
> >
> > Regards,
> > Su Heng
> >
> > --
> > QQ : 49757862
> > MSN: suh.steven_at_hotmail.com
> > Mobile: (0512)60780554
> >
>

Hi Bob,

  What about different lines?
trunk file node_at_r1
node:
-----
line1
-----

create branch node1(node_at_r2), node2(node_at_r3)

edit node_at_r2 under branch node1
-----
line1
line2
-----
submit and get node_at_r3

edit node_at_r3 under branch node2
-----
line1

line3
-----
submit and get node_at_r4

edit node_at_r1(or merge branch node1) under trunk
-----
line1
line2
-----
submit and get node_at_r5

finally, merge branch node2_at_r4 to trunk can get conflict.

<<<<<<< .working
line1
line2=======
line1

line3>>>>>>> .merge-right.r4

 I though node2_at_r4 will be merged to node_at_r5 like this:
-----
line1
line2
line3
-----

but not.

-- 
Regards,
Su Heng
MSN: suh.steven_at_hotmail.com
Received on 2011-04-04 19:51:20 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.