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

RE: what's wrong with merging twice?

From: Tony Sweeney <tsweeney_at_omnifone.com>
Date: Wed, 6 May 2009 10:24:32 +0100

Consider a change where you add a single line to a file:

13: ...
14: i += 2; // This is the new line
15: ...

When you merge that change to another branch, Subversion looks at the
file before and after the change and generates a patch that says "add
the following line after line 13". The first time you merge this
change, Subversion will correctly add the new line 14. However, if you
merge it again, Subversion has no knowledge that the change has already
been applied, so it will blithely do what the patch says, again. Now
you have:

13: ...
14: i+=2; // This is the new line
15: i+=2; // This is the new line
16: ...

Oops.

Obviously this is the simplest possible example, with only a single line
change. It rapidly gets more complicated when a change touches a file
in several places, possibly spanning statement blocks, etc.

Tony.

> -----Original Message-----
> From: webpost_at_tigris.org [mailto:webpost_at_tigris.org]
> Sent: 05 May 2009 19:06
> To: users_at_subversion.tigris.org
> Subject: what's wrong with merging twice?
>
> The 1.4 version of the redbean book used to warn about the
> dangers of merging twice, and told you to note in the log
> what range of revisions you are merging so you know which
> range to merge each time.
>
> Can you describe what type of problem could occur as a result
> of merging the same revisions twice?
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&
> dsMessageId=2071509
>
> To unsubscribe from this discussion, e-mail:
> [users-unsubscribe_at_subversion.tigris.org].
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit
> http://www.messagelabs.com/email
> ______________________________________________________________________
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2078904

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-05-06 11:25:01 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.