[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: Johan Corveleyn <jcorvel_at_gmail.com>
Date: Fri, 8 Jan 2010 13:00:41 +0100

Just throwing in my 2 cents: another way to create such "partial
branches" is by performing an "svn copy" with multiple sources
directories (all the ones you want in your branch), all in one commit
directly on the repository. That way, you don't have to delete
anything afterwards (you have only branched what you want).

Say your repository looks like this:
/trunk/proj1
/trunk/proj2
/trunk/proj3
/trunk/proj4
/branches

You want to create a branch (say rel1.0) with only proj2 and proj4 in
it, you can do it like so:
svn copy --parents $REPO_URL/trunk/proj2 $REPO_URL/trunk/proj4
$REPO_URL/branches/rel1.0

This makes use of a little known feature of "svn copy", namely that
you can specify multiple source paths:
    usage: copy SRC[@REV]... DST

Note that you need the --parents option, which will automatically
create the rel1.0 directory if that doesn't exist yet.

I have no idea how to do this with TortoiseSVN though, but maybe it's
possible with the Repo-browser, multi-selecting your sources paths and
the copying them...

Anyway, that probably doesn't answer your real question, which is how
to combine two such branches into one working copy. Sorry, I have no
ideas there...

Regards,
Johan
Received on 2010-01-08 13:01:15 CET

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