开发者

SVN tags: How not to update/checkout them?

In many projects, I check out the complete repository and have then the standard directory structure:

project/
    branches/
    tags/
    trunk/

If I do an svn up project, it's all fine with the branches and trunk folders, but, of course, the tags folder is updated, too, and filled with (mostly) lots of tagged versions that are of no value for my work and only occupy disk space.

How can I except the tags folder from an svn update? Especially, how can I do this locally only, that is, without committing that back to the repository, as a solution with 开发者_StackOverflow中文版the svn:ignore keyword would do?


Subversion has a feature called Sparse Checkout for this case.

svn up --set-depth empty project/tags

This will remove all checked out tags, leaving only the "tags" directory behind.

Another option is:

svn up --set-depth immediates project/tags

which will check out the tag directories itself, but not their content.
This way you can easily see new tags and get the contents of single tags with:

svn up --set-depth infinity project/tags/mytag

Edit:

This is working with elcucos solution, too and you can even use it for your branches directory.


First you check out the top of the project in non recursive way (-N or --non-recursive)

svn co https://server/project -N my_project_checkout

Now at this stage you can update only the trunk:

svn up my_project_checkout/trunk


You should be checking out and working in the trunk or on a specific branch. It sounds like you have checked out the entire project tree.


To update only specific folder pass them to the svn update command.

svn update project/branches project/trunk
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜