[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: Adrian Hoe 贺文耀 <mailbox_at_adrianhoe.com>
Date: 2006-06-12 17:00:19 CEST

Sorry for the confusion. I had actually checkout revision 1 and made
some changes to see if the new design suited the requirement and then
I realized it became drifted away from the trunk (main design, in
this case) which I thought might be useful. I wasn't expecting such
changes but when I realized it, I would better make a branch.

I already have r1 as my working copy and I have made some changes.

I did what you have suggested and checked out a copy (second work
copy) with branch from r1. Then I copied the files from the previous
work copy (r1) into this second work copy. It works.


On Jun 12, 2006, at 6:37 PM, Ryan Schmidt wrote:

> 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.

"If you missed the rising sun and the morning dew, don't miss the  
beautiful sunset." -- Adrian Hoe inspired by Michal Nowak, June 15 2004
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Jun 12 17:02:16 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.