user915783
user915783

Reputation: 699

How do I undo "Tag commit" in SVN?

I want to undo commit of tag on SVN, not a commit of trunk/branch. How do i do that?
Also, after deletion, if a tag commit is done, would revision number of new tag commit would be same as last deleted one or 1 higher?
Thanks
sedy

Upvotes: 1

Views: 3516

Answers (1)

me_and
me_and

Reputation: 15664

Creating a tag in Subversion is functionally identical to creating a branch; the only difference is the place you store them.

Assuming you created a tag by running something like svn copy svn://repo/trunk svn://repo/tags/tag_name, you can delete the tag by running svn rm svn://repo/tags/tag_name.

Creating the tag created a new revision number, deleting the tag will create another new revision number, and creating a replacement tag will create another one still. This may seem like it's not very neat, but it's generally considered a good idea keep the full history of the repository, so in future you can see what happened in the past. The impact on disk space of this is incredibly small, so that's not something you need to worry about.

If you do want to avoid the revision numbers incrementing like that, you'll need to completely remove the commit that created the tag from the Subversion repository. This is possible, but it's difficult. The Subversion FAQ suggests multiple methods for deleting a commit permanently.

Upvotes: 6

Related Questions