Question

In Clearcase I can generate a "label" for a given set of files and always go back to that label to regenerate all the files as they were when I generated the label.

How do I do this in Subversion? I'm using the Tortoise front end [Windows] to SVN and I'm not sure how to accomplish this functionality.

Was it helpful?

Solution

In fact in SVN every commit creates a 'label'. You can go back to every revision (commit) at any moment.

There is no difference between a branch and a tag in theory. Just that a branch is developed further and merged with commits from different developers whereas noone should ever commit to a tag.

Tags are normally given a more verbose name such as 'RC 1.5 - the day when it finally seemed to be stable'.

That explains why 'Create branch/tag' in Tortoise are one.

And essentially svn just creates a copy of the last revision into another directory (e.g. tags). This copy is of course not a full copy but a normal diff, therefore the continuous revision numbers.

OTHER TIPS

The equivalent to a label in subversion is a "tag" (i.e. creating a branch in a folder for the specific purpose of marking a revision). In the repo-browser, right click, "Copy to..." and then pick a new folder name.

http://svnbook.red-bean.com/en/1.5/svn.branchmerge.tags.html

Tags are the equivalent of labels in Subversion.

Tags are created via the copy command, or in the TortoiseSVN Branch/Tag menu option.

By convention, tags are copied to a tags path in the Subversion repository.

BTW, the TortoiseSVN help is really well done - the Daily Use Guide is very helpful.

You could do this two ways.

  1. Commit the current state of files, now you can always revert to this revision and get that state of your files back

  2. Create a new tag with your current files, and continue working in the trunk.

Use svn copy and create a copy in the tags folder. This is more convention than anything else, but most repositories will have folders called trunk, tags, and branches.

Don't worry about creating extra copies - it's not really duplicating all those files -- copies are cheap in subversion.

For example:

svn copy /trunk/foo /tags/foo-1.0
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top