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

Re: How do I create branch from older revision?

From: Ryan Schmidt <subversion-2006q2_at_ryandesign.com>
Date: 2006-06-12 12:37:46 CEST

On Jun 12, 2006, at 08:22, Adrian Hoe 贺文耀 wrote:

> I have a repository for a website which has about 50 revisions.
> Now, I have made some changes in revision 1. This new changes will
> be a new development. How do I create a new branch out of the first
> revision?
> I want Revision 1 to be in the trunk and the branch so that I will
> know the Revision 2 in the branch is based on Revision 1 of the
> main trunk.

I'm a little confused by some of your terminology...

But if you want to create a new branch from revision 1 of the trunk,
then you would do this (assuming $REPO is your repository URL):

svn copy -r 1 $REPO/trunk $REPO/branches/somebranch \
-m "Creating branch somebranch from revision 1 of trunk"

Now you can "svn checkout" the new branch and make changes to it.

Your second sentence above ("Now, I have made some changes in
revision 1") makes it sound like you have already made these changes
somewhere. Did you perhaps already get a working copy of trunk,
backdate it to revision 1 ("svn up -r 1"), and start making your
changes there? If so, then you should "svn switch" that working copy
to the new branch.

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Jun 12 12:39:20 2006

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.