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

Re: Retroactively branching something / trimmed branches

From: Ryan Schmidt <subversion-2005_at_ryandesign.com>
Date: 2005-11-01 21:34:17 CET

On Nov 1, 2005, at 18:31, Roger Lipscombe wrote:
> I forgot to branch before making a bunch of changes to something,
> so I’m looking at retroactively branching it. What’s the
> recommended way to do this? I’m on Windows, so I’m using a mixture
> of Tortoise and the command line. I’m thinking that I need to
> create (and add) a new branches/Foo-3.0 folder; then I was going to
> check out trunk (with –r1234 to get the revision before I made the
> bunch of changes), then I was going to use Tortoise to copy the
> files from ‘r1234’ into ‘branches/Foo-3.0’.
>
> Will this work? Is it the simplest way to do this? What should I do
> instead?
Depends on what you mean. Do you mean: You have a trunk, and you have
continued to develop on the trunk, but now you want to have a branch
that's based on an earlier version of trunk? If so, then you can
simply copy that earlier trunk:

svn cp -r 1234 -m "Making Foo-3.0 branch from trunk r1234" \
$REPO/trunk \
$REPO/branches/Foo-3.0

> Another (related) question: when creating a branch in the past,
> I’ve simply done svn cp http://svn/repos/trunk http://svn/repos/
> branches/Bar-2.0. We have more than one product in source control,
> which means that they all get copied into the branch. This is
> confusing. However, I can’t copy just the product directory,
> because it’ll be dependent on stuff in the ‘Lib’ directory. How
> should I go about trimming down a branch to only include the stuff
> really needed for building a particular version of a product?
So you are using this layout:

/repo/
        trunk/
                lib/
                project1/
                project2/
        branches/
                foo-branch/
                        lib/
                        project1/
                        project2/
        tags/
                foo-tag/
                        lib/
                        project1/
                        project2/

This is a good layout if all projects are related and have the same
release cycle. But if you have a bunch of unrelated projects that get
released at different times with different version numbers, it may be
better to organize the repository for that:

/repo/
        lib/
                trunk/
                branches/
                        foo-branch/
                tags
                        foo-tag/
        project1/
                trunk/
                branches/
                        bar-branch/
                tags
                        bar-tag/
        project2/
                trunk/
                branches/
                        baz-branch/
                tags
                        baz-tag/

Or, if you prefer, and if the projects are totally separate from one
another, you can use separate repositories.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Nov 1 21:38:09 2005

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.