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

RE: How is mergeinfo calculated for hierarchies?

From: Nicholas Curry <Nicholas.Curry_at_cofunds.co.uk>
Date: Wed, 8 Apr 2009 09:27:43 +0100

Hi Tyler,

Thanks a lot for taking the time to go through my message - I sure am
sorry to hear that no-one knows how mergeinfo works (a little bait to
see if I can get anyone who does to take an interest in explaining...)

I'll go through the article you mention and compare it to what I've
observed so far!


-----Original Message-----
From: Tyler Roscoe [mailto:tyler_at_cryptio.net]
Sent: 07 April 2009 18:14
To: Nicholas Curry
Cc: users_at_subversion.tigris.org
Subject: Re: How is mergeinfo calculated for hierarchies?

Hi Nicholas,

I found this article very helpful:


plus of course the chapter in the svn book about merging.

I'm not at all an expert on how mergeinfo works, but I'll take a whack
at your questions:

On Tue, Apr 07, 2009 at 03:20:08PM +0100, Nicholas Curry wrote:
> * the mergeinfo is what allows SVN to keep track of what files need
> merging and which don't when repeatedly merging from one branch to
> another. So for instance, if I try to merge /branches/branchA into
> /branches/branchB 3 times in a row without any changes being committed
> to either branch in between merges, only the first will result in any
> changes, including svn properties (assuming that there are changes in
> /branches/branchA that are eligible for merging into /branches/branchB
> at the time of the first merge.)


> * mergeinfo is inherited; so:
> * if I merge /branches/branchA into /branches/branchB, and then
> merge /branches/branchB/file1 into /branches/branchC, SVN won't
> to re-merge file1 when I merge branchA into branchC.

I think this will work but I would test it before relying on it.

> * if I merge /branches/branchA into /branches/branchB, the
> is stored at the /branches/branchA (top) level rather than for each
> nested file/folder


> * if a /branches/branchA/folder1/file1 has a mergeinfo property for a
> specific branch and revision range (e.g.
> "/branches/branchB/folder1/file1:1-5"), and then /branches/branchB is
> merged into /branches/branchA, the mergeinfo properties will be
> for both /branches/branchA (at the top level) and
> /branches/branchA/folder1/file1 (for nested files with existing
> mergeinfo properties). SVN doesn't attempt to 'automatically' work out
> the differences between mergeinfo properties in nested hierarchies to
> get rid of any redundant information.

My understanding is that Subversion is supposed to try and "elide"
unnecessary mergeinfo when possible.

> * when the inherited mergeinfo is calculated, SVN takes into account
> mergeinfo of parent folders that are outside of the specified
> into account. So for instance, if I merge /branches/branchA into
> /branches/branchB (revisions 1-6), and then later try to merge
> /branches/branchA/folder1 into /branches/branchB/folder1 (revisions
> 1-10), SVN won't try to re-merge revisions 1-6 from
> /branches/branchA/folder1 into /branches/branchB/folder1.

This is what I think is supposed to happen, but I the behavior I saw was
different. I don't know if I'm just unpopular or what, but when I asked
a similar question I got no response, so my impression is that no one
understands how mergeinfo inheritance works :).


> * Conversely, SVN also considers the mergeinfo for nested
> when performing a merge; so if I merge /branches/branchA/folder1 into
> /branches/branchB/folder1 (revisions 5-10), and later try to merge
> /branches/branchA into /branches/branchB (revisions 5-20), SVN won't
> to re-merge revisions 5-10 from /branches/branchA/folder1 into
> /branches/branchB/folder1.

I think this is correct.


This e-mail has been swept for viruses by Cofunds.
For more information on this service, please
contact the IT Service Desk on Ext: 7060 or itservicedesk_at_cofunds.co.uk.

Cofunds Limited, 1st Floor, 1 Minster Court, Mincing Lane,
London EC3R 7AA. Registered in England and Wales
No 3965289. Authorised and regulated by Financial Services Authority. Phone: 0845 604 4001, or visit our website at www.cofunds.co.uk.
Telephone calls may be recorded for monitoring purposes.
The information contained in this message may be CONFIDENTIAL and is intended for the addressee only. Any unauthorised use, dissemination of the information, or copying of this message is prohibited. If you are not the addressee, or believe this email to have been sent in error, please notify security_at_cofunds.co.uk immediately and delete this message.
Although this e-mail and any attachments are believed to be free of any virus, or other defect which might affect any computer or system into which they are received and opened, it is the responsibility of the recipient to ensure that they are virus free and no responsibility is accepted by Cofunds for any loss or damage from receipt or use thereof.
This email does not create or vary any contractual obligations between Cofunds Limited and the addressee. Any views or opinions are solely those of the author and do not necessarily represent those of Cofunds Limited.
Those communicating with us by electronic mail will be deemed to have accepted the risks associated with interception, amendment, loss and late or incomplete delivery. They will also be deemed to have consented to our monitoring of such communications.


To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-04-08 10:28:36 CEST

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