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

Re: Union of Multiple Branches

From: Rob van Oostrum <rvanoo_at_gmail.com>
Date: Wed, 6 Jan 2010 23:31:48 -0500

"Cleaning up" your branches is a bad idea. It just creates that much more
administrative overhead. Not to mention having to tiptoe around the
deletions when merging the branch back to trunk, which will affect merge
tracking's performance.

What I would do instead is leverage sparse checkouts to only checkout the
root folder of the branch, and selectively grab the directories you need to
work with.

You can create mixed working copies by using 'svn switch' to point specific
folders to their equivalents on specific branches/tags.

Regards,
Rob

On Wed, Jan 6, 2010 at 8:23 PM, BRM <bm_witness_at_yahoo.com> wrote:

> ----- Original Message ----
>
> > I understand this is not common workflow, but I'd like to know if there
> is a
> > simple way to accomplish this goal before I start scripting a solution.
> >
> > Some background: one of the requirements for my organization moving to
> > subversion was the ability to create tags/branches that contain a subset
> of
> > files on the trunk. We accomplish this by creating the tag/branch, and
> svn
> > rm'ing any files that aren't required until we've arrived at the desired
> > fileset. We work with very large files and need to use subsets of files
> to
> > avoid lots of disk usage/network traffic.
>
> That is quite an unusual work flow. And with the efficiency of SVN, you're
> really probably just saving the disk space - may be.
> Network traffic would mostly occur during initial checks; the rest (namely
> updates) is pretty efficient.
>
> > Some users have asked if it is possible to check out multiple tags into
> the same
> > workspace. That is, if we have tag a and tag b with files independent of
> one
> > another but common directories, is it possible to check out a workspace
> that is
> > an amalgamation of tag a and tag b. Merge doesn't get me what I need
> because
> > the merge replays all of the file deletes that were used to generate a
> subset
> > tag.
> >
> > So my question is: is there a way to get two branches/tags to live in the
> same
> > workspace?
>
> Your best way to accomplish this is to create another branch (e.g.
> UNION_A_B) and then use svn:externals to map the two you want to bring
> together into sub-folders.
> SVN cannot (at least to my knowledge) operate on individual files within a
> folder in this manner.
>
> So basically:
>
> branch/A
> branch/B
> branch/UNION_A_B
> branch/UNION_A_B/A -> branch/A
> branch/UNION_A_B/B -> branch/B
>
> this will result in any updates to branch/A being seen on update in either
> location. Likewise with branch/B.
> The user only needs to check out branch/UNION_A_B to get both.
> Additionally, since you are using the svn:externals property,
> branch/UNION_A_B/A and branch/UNION_A_B/B don't really exist in the
> repository, but are stored as properties (e.g. absolute minimal storage)
> that tell the SVN client to checkout those as sub-directories of
> branch/UNION_A_B - so disk space and network traffic are both minimized as
> well.
>
> HTH,
>
> Ben
>
>
>
Received on 2010-01-07 05:32:22 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.