Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How are tags made in Subversion?

Tags:

svn

I know how to use tags in subversion. I create a tag every time I get to a release milestone.

What I don't quite understand is how they work.

Is a tag just a copy, made from what ever revision I specify? Or is a tag more like a reference, where internally subversion just says GO TO /trunk/project/ Revision 5 or whatever.

The command to create a tag (svn copy) seems to imply that it's a copy, but I've seen other people write that subversion doesn't really copy anything.

Say I dump just the HEAD revision of a repository. I don't care about any history except the tags. Are those tags dumped along with the rest of the Head revision?

Finally, is all this just programming magic that I don't really want to know.

like image 689
Grant Avatar asked Sep 02 '08 16:09

Grant


People also ask

How do tags work in svn?

Version Control System supports the tag operation by using that concept that one can give meaningful name to a specific version of the code. Tag allows to give descriptive and memorable names to specific version of code. For example BASIC_ARRAY_OPERATIONS is more memorable than revision 4.

How do I tag a folder in svn?

Select the folder in your working copy which you want to copy to a branch or tag, then select the command TortoiseSVN → Branch/Tag.... If you can't remember the naming convention you used last time, click the button on the right to open the repository browser so you can view the existing repository structure.

How do I create a branch trunk tag in svn?

Creating a branch is simple. All you need to do is make a copy of your project using "svn copy". This command will require the URL of your project's /trunk directory as well as the URL of the directory where you want to create your branch. This location will virtually always be inside of your /branches directory.


1 Answers

Yes, a svn copy (whether you are thinking of it as a tag, a branch, or copying a file in trunk) is all the same. SVN will internally create a pointer to the source location at that revision. If you then make changes to the copy (which you are likely to do if it is a branch or a copied file in trunk, but shouldn't do for tags), SVN will only store what was changed, rather than creating a whole new copy.

like image 118
pkaeding Avatar answered Sep 23 '22 21:09

pkaeding