Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to create a branch from a tag in TortoiseSVN without first checking out the tag from SVN server?

Our trunk directory contains about 100mb of code and we create tags from the trunk directory. Normally, this is not an issue because a tag takes up no space until you need to use it for something. Since branches are created from tags in SVN, how can I create a branch from a tag wtihout first checking out the tag? It appears I need to do a Tortoise Update from Windows Explorer to get the tag down to my local machine before I can use Tortoise > Branch/Tag... to create a branch from it. This seems illogical since we don't make changes to tag folders, and it requires that I check out 100mb of code, only to create a branch, and then check out another 100mb of code in the branch folder, where the changes will actually be made.

Ideally, I'd be able to create a branch directly in the repository via RepoBrowser - but I can't see an option for it there.

Am I missing something?

like image 254
Scott Vierregger Avatar asked Jun 14 '10 16:06

Scott Vierregger


People also ask

Can I create a branch from a tag in svn?

To create a branch or a tag in a Subversion repository, do the following: From the main menu, choose VCS | Subversion | Branch or Tag. Alternatively, select the source folder in the SVN Repositories tool window and choose the Branch or Tag command from the context menu.

How do I branch out in TortoiseSVN?

Creating Branches in TortoiseSVN To create a branch with TortoiseSVN, select the folder in your working copy which you want to copy to a branch or tag, then right-click and select the command TortoiseSVN → Branch/Tag....

What is different between branch and tag in svn?

Tags and branches are technically equivalent. The difference is how they are typically used. You use branches to make an editable copy of code so that you can develop a stable and a working copy at the same time. You use tags to make a read-only copy of code so that you can conveniently get that code later.

What happens when a branch is created in Subversion?

Subversion Branching Strategies SVN's “branch” directory runs parallel to the “trunk” directory. A SVN branch copies the trunk and allows you to make changes. When the new feature is stable, the branch is merged back.


2 Answers

Creating a branch is just a matter of copying the desired directory to another location. This can be done directly in the Repo Browser.

There is nothing special that differentiates a branch from a tag as far as Subversion is concerned. It is just a convention to store them under separate parent folders, named 'branches' and 'tags' accordingly.

like image 101
Ben Hoffstein Avatar answered Oct 08 '22 12:10

Ben Hoffstein


The only difference between tags and branches is your attitude towards them -- they are equivalent behind the scenes -- shadow copies made in the repository.

You don't even need a working copy to create a branch/tag. For example, you can use this command-line:

svn copy http://server/test/trunk http://server/test/branch -m "make branch"

(assumes you have SVN.EXE in addition to TortoiseSVN, otherwise, use Ben's answer)

like image 28
William Leara Avatar answered Oct 08 '22 13:10

William Leara