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

Re: Request for comments on an svn fork and merge feature

From: Mike Dixon <michael.dixon_at_denovosoftware.com>
Date: Tue, 16 Feb 2010 17:21:12 -0800

NB. Please use Reply To All to keep replies on the list.

Andy Singleton wrote:
> Thanks. We should definitely look more closely at reintegrate.
>
> Will reintegrate work correctly with separate repositories where the
> version numbers start to diverge? It would help me a lot if you
> would just walk through the process of working with both
> repositories, and the exact operations.

As far as I understand it, using --reintegrate is just a convenient
wrapper around a 2-URL merge. I haven't personally tried it with two
repositories, but I don't have any reason to expect it to not work.

> If we commit to using the reintegrate merge, we might be able to make
> it more reliable. If it turns out that we need to have the server
> set some properties to make this work, we could program the servers
> to do that.

I haven't had any problems using --reintegrate. What reliability issues
are you worrying about?

> I did see this in the link that you sent me: "An important thing to
> point out, and I am not sure if the documentation currently does, is
> that once a branch is reintegrated, it should really be deleted. If
> more work needs to happen, create it again with a fresh copy." This
> is exactly the effect of the "Update fork" operation that we
> implemented. Maybe this advice is not correct anymore.

Hmm? I don't think I sent you any links? The svn book does mention this
issue, though:

   In Subversion 1.5, once a --reintegrate merge is done from branch to
   trunk, the branch is no longer usable for further work. It's not able
   to correctly absorb new trunk changes, nor can it be properly
   reintegrated to trunk again. For this reason, if you want to keep
   working on your feature branch, we recommend destroying it and then
   re-creating it from the trunk:

So yes, after doing a reintegrate, you need to either delete the branch,
or do a record-only merge of the reintegrate revision from trunk to the
branch. Otherwise when you next do a merge involving the branch, svn
doesn't know to skip the reintegrate revision, and Bad Things (in the
form of applying all your branch's changes to itself) will happen.

Incidentally, I really would recommend reading the latest version of the
entire svn book, especially Chapter 4, Branching and Merging. This stuff
changed a lot with 1.5 (and again with the tree conflict system in 1.6),
and there is a lot of historical discussion that has gone into
developing the currently-recommended best practices.

http://svnbook.red-bean.com/nightly/en/svn.branchmerge.html

-Mike
Received on 2010-02-17 02:21:56 CET

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.