tags:

views:

101

answers:

4

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 the svn:ignore keyword would do?

+2  A: 

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.

anon
Actually, yes, I'm checking out the whole thing, since it a) suits my workflow for that specific projects, and b) is easily updateable with a single `svn up` (in contrast to 2 `svn up`s for splitted checkouts). I hoped for a solution with the ability to keep the full repo checked out.
Boldewyn
Ok, but in some case it might be more than you need under `trunk` as well. The question is really is it possible to say that you want only directories 'a', 'b', and 'd', and NOT 'c' ?
awe
+5  A: 

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
elcuco
Cool, that works like intended.
Boldewyn
+1  A: 

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

svn update project/branches project/trunk
Thomas Meyer
+3  A: 

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.

Hardcoded