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

Re: correctly merging partially branched directories

From: Tino Schwarze <subversion.lists_at_tisc.de>
Date: Mon, 20 Sep 2010 15:03:22 +0200

Hi there,

I suppose, I found the solution: To perform a merge, I'll only check out
the affected modules (e.g. /branches/customerABC/solution1/1.0), then do
an "svn merge" on each of the modules separately. After resolving any
conflicts, I'll just commit everything at once.

The same works for backwards-merges - only check out the modules
involved, do not perform the merge on /trunk but on /trunk/module1 ...
/trunk/modulen, then commit all together.

Right?

Tino.

PS: Sometimes it just takes writing the problem down in a structured
manner, leaving it alone for a while and the solution pops up. :-)

On Mon, Sep 20, 2010 at 12:43:38PM +0200, Tino Schwarze wrote:

> I'm currently preparing our move from CVS to SVN. We've got a rather
> large application consisting of several modules some of which are
> specific for some customers.
>
> Our repository will look like this:
>
> /trunk/core-module
> /trunk/xyz-module
> /trunk/customerABC-module-1 (several modules per customer)
> /trunk/customerDEF-module-1
> /branches/customerABC/solution1/1.0/core-module
> /branches/customerABC/solution1/1.0/xyz-module
> /branches/customerABC/solution1/1.0/customer1-module1
> /branches/customerABC/solution1/1.1/core-module
> /branches/customerABC/solution1/1.1/xyz-module
> /branches/customerABC/solution1/1.1/customer1-module1
> /branches/customerDEF/solution2/1.0/core-module
> /branches/customerDEF/solution2/1.0/xyz-module
> /branches/customerDEF/solution2/1.0/customer2-module1
>
> So, we only get some of the modules (read: subdirectories) of /trunk in
> the customer branches. When converting using cvs2svn it generates SVN
> commits like this:
>
> add /branches/customerABC/solution1/1.0/ (copy from /trunk)
> delete /branches/customerABC/solution1/1.0/customer2-module
>
> Of course, when reintegrating to trunk, I'm guaranteed to get a tree
> conflict if anything has been changed there (and if not, the module gets
> deleted which is even worse).
>
> After the move to SVN, merging will not be a problem since I've created a
> wrapper script which allows us to branch only certain modules (using SVN
> copy with multiple sources). This has the disadvantage that the topmost
> branch directory like /branches/customerDEF/solution2/1.0/ is not a
> parent of /trunk/ but we can work around that by applying "svn merge" to
> each module sequentially, then committing everything at once.
>
> So back to my original question: How do I manage these kinds of merges?
> - How do I avoid tree conflicts when merging trunk to branch and there are
> changes in a module not present in the branch?
> - How do I avoid merging back the "delete module" operation generated by
> cvs2svn?
>
> Thanks,
>
> Tino.
>
> --
> "What we nourish flourishes." - "Was wir nähren erblüht."
>
> www.tisc.de

-- 
"What we nourish flourishes." - "Was wir nähren erblüht."
www.tisc.de
Received on 2010-09-20 15:04: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.