Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using tortoiseSVN, how do you tag the code?

Tags:

tortoisesvn

Using TortoiseSVN, how do you tag the code?

Is the process to branch exactly the same?

I know you have to just copy the code to the /tag/ folder, but how?

i.e. I want to copy revision # to a tag#.

Will it affect the /trunk/ at all?

like image 898
mrblah Avatar asked Aug 11 '09 14:08

mrblah


People also ask

What is TortoiseSVN tag?

Tags allow us to give a more human-friendly name to a specific revision of our folders/files. Branching gives us the capability to create a copy of the folders/files in our repository and have a different copy to work on – without fear of corrupting our main copy.

Does SVN tag?

Subversion does not have special commands for branching or tagging, but uses so-called “cheap copies” instead. Cheap copies are similar to hard links in Unix, which means that instead of making a complete copy in the repository, an internal link is created, pointing to a specific tree/revision.

Can you commit to a tag in SVN?

In SVN, tag is just a copy in /tags directory, so commiting is possible, but that's just an implementation detail. Nothing prevents you from commiting, but it's unusual, and people using the tag may be confused what exactly this tag represent ... original revision when tag was created or new changes.


1 Answers

The answers here were missing some key information for getting started with SVN and braches.

Step 1: You need to make sure you have a suitable branches/tags dir. e.g. if your project has this structure:

url/myproj/trunk/...

you also need:

url/myproj/tags/
url/myproj/branches/

To do this, don't "add" the directories and commit them, or tortoise will give you an error. Instead use the tortoise svn repo-browser, go to myproj then right click and "add Folder".

Step 2: Right click on your trunk folder, select "tortoise SVN" then "branch/tag". The copy branch/tag dialogue now pops up.

Step 3: Set the "to Path" to "/myproj/tags/myversion" where myversion is usually something like "1.0". Select "Head revision in the repository" and make sure "switch working to new branch/tag" is not checked. Hit OK.

Step 4: Unfortunately, next time you do an update, it will pull down the branches and tags as files. This means your HD will get filled with every file from every branch and version created. One solution is to only checkout each individual trunk dir, which is not always convenient (as you have to manually update 30 trunk dirs if you have one repo with 30 projects).

Personally, having used CVS, SCCS, PVCS, VSS & Rational for 30 years, I find SVN much harder to work with.

like image 75
wingnut Avatar answered Oct 03 '22 00:10

wingnut