4
votes

I'm having some issues using TortoiseSVN/SVN with working folders and the .SVN folder.

Say I have a structure like the following:

trunk/
     src/
     sdk/
     lib/

If I wanted to check out the src folder and sdk folder but NOT the lib folder and I do a checkout on the two folders separately, the .SVN folders will be under both src/ and sdk/.

How, then, would I get the /trunk/ folder itself under source control? If I do a checkout then it will checkout everything including the lib folder, unless I limit the depth, in which case it won't know about any subfolders.

Really what I need is some way to sync folders.

Any suggestions?

Thanks!

4

4 Answers

7
votes
  1. Use TortoiseSVN to checkout the parent directory
  2. Select "Fully Recursive" depth
  3. Click "Choose Items" and deselect the folders you don't want checked out
  4. Click OK.

If you already have the parent directory checked out and you want to change the subset of folders that you have checked out, right click your parent folder and select "TortoiseSVN | Update to Revision...". In this window you can select "Choose Items" and deselect the folders you don't want in your working copy any more.

1
votes

I have not used the feature myself, but Subversion supports "sparse directories".

In our example, we operated only on the root of our working copy, changing its ambient depth value. But we can independently change the ambient depth value of any subdirectory inside the working copy, too. Careful use of this ability allows us to flesh out only certain portions of the working copy tree, leaving other portions absent altogether (hence the “sparse” bit of the feature's name). Here's an example of how we might build out a portion of one branch of our family's tree, enable full recursion on another branch, and keep still other pieces pruned (absent from disk).

You can read more in the svnbook entry for Spare Directories

1
votes

The easiest way I know of using Tortoise is to make a blank directory of the same name and then right click on it and choose "Unversion and add to ignore list" from the tortoise svn list item this will make any subsequent updates ignore this folder. I often do it with the compiled code... its easiest to pull it all in then add the folders you don't want to the ignore list then them out.