You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Adrian Hoe 贺文耀 <ma...@adrianhoe.com> on 2006/06/12 06:22:01 UTC

How do I create branch from older revision?

Hi,

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.

Thanks in advance.

Best regards,
--
"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
http://adrianhoe.com


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: How do I create branch from older revision?

Posted by Adrian Hoe 贺文耀 <ma...@adrianhoe.com>.
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.

Thanks.



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
http://adrianhoe.com


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: How do I create branch from older revision?

Posted by Ryan Schmidt <su...@ryandesign.com>.
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