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

Re: [BUG] Merging to a branch with sparsely checked out files fails without error

From: Paul Burba <ptburba_at_gmail.com>
Date: Wed, 25 Mar 2009 09:48:18 -0400

On Tue, Mar 24, 2009 at 6:03 PM, Kari Granö <kari.grano_at_gmail.com> wrote:
> On Tue, Mar 24, 2009 at 4:26 PM, C. Michael Pilato <cmpilato_at_collab.net> wrote:

>> 2b.  Subversion can record the merge on every present sibling of /trunk/testdata -- /trunk/src and /trunk/doc, in this case.
>
> As others have pointed out, this happens currently when you specify "--depth=infinity".  Just having this as the default behavior would already be much better.

Hi Kari,

Everyone on this thread seems to agree that is a better option. I'll
look into it a bit more to make sure there isn't some problem lurking
in the details and then propose this change in a separate thread.

> However, this leads to another, unrelated problem: merges into sparse
> working copies invariably produce subtree mergeinfo,

Yes, this is intentional, we need some way to record that the merge
was never performed for the "missing" portions of the working copy,
i.e. the shallow subtrees. This is explained in painful detail in
http://www.collab.net/community/subversion/articles/merge-info.html in
the "Mergeinfo Inheritance and Non-Inheritable Ranges" section.

> which makes it hard to reason about the performed merges and can cause problems
> with "merge --reintegrate".

Problems? I can't see how it would *ever* work. Reintegrate was
never intended to support the use case where you had a shallow branch
working copy. Keep in mind that --reintegrate is simply a shortcut
for a 2-URL merge along with some safety checks to keep you from
shooting yourself in the foot. If reintegrate balks you can always
perform the underlying 2-URL merge,
http://blogs.open.collab.net/svn/2008/07/subversion-merg.html.

> I find myself manually fixing svn:mergeinfo after such merges, which is
> a bit tedious.

By fix you mean delete? If so and it works for you great, but there
are very simple use cases where doing this will revert changes on your
trunk when reintegrating (hence the safety checks I mentioned before).

> I guess there's no way around that.

Barring fundamental changes in how mergeinfo is recorded probably not.

Paul

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1415598
Received on 2009-03-25 14:48:45 CET

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

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