Reputation: 770
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.
Upvotes: 12
Views: 27860
Reputation: 40685
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.
Upvotes: 12
Reputation: 3458
You could do this two ways.
Commit the current state of files, now you can always revert to this revision and get that state of your files back
Create a new tag with your current files, and continue working in the trunk.
Upvotes: 1
Reputation: 13357
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.
Upvotes: 2
Reputation: 28573
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
Upvotes: 6
Reputation: 9478
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
Upvotes: 0