开发者

How do I delete svn tagged versions from server and keep them in the repository?

I've taken over a web application that is using Subversion. When the code is released, a tag is created in the repository, and then the 'svn update' command is used on the server to bring the release code up to the latest version.

This process works great, but it has been going on for over 2 years, and now there are over 100 tags on the webserver and add开发者_开发问答 up to over 10 gigs. The partition they are on is getting full, and I would like to remove the older tags and keep only the current tagged version.

From what I understand the tags contain versioning information and are dependent upon each other. I've tried just deleting the old tags from the server, but as soon as I run 'svn up', they return. Is what I want to do possible? Can I only have the most current tag on the server, or do I need to start thinking of a new deployment process?


Why do you have all your tags checked out? Checkout the current tag with svn co http://repo/tags/v1.0 When you want to update the webserver you switch to the new tag, svn switch http://repo/tags/v1.1


You can delete the tags using svn rm http://repo/path/to/tag. This removes them from HEAD, but obviously they are still in history and can be retrieved if needed. After that, your svn up will no longer retrieve old tags and will remove the deleted ones from its working copy.

Another possible solution is to have a "moving tag", such as tags/CURRENT, that always points to the latest tag. Your release process would do an svn cp new-prod-tag http://repo/tags/CURRENT. Then your server would only need to checkout and update that CURRENT tag, instead of all the tags. DISCLAIMER: This is not an encouraged practice with SVN, but I wanted to throw it out there as a potential solution.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜