----- 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 02:23:48 CET