0

We use SVN for a giant server of design assets at my job. I like to keep the root of our server checked out, so I can get organizational updates to the directory hierarchy as they're made. But their are certain directories within that I won't ever be touching... and they're huge... 15 gb+.

I want to rm these directories, and have them not pull back down when I svn up from the root. Is this possible?

Fuego DeBassi
  • 2,967
  • 6
  • 29
  • 37
  • Check this http://stackoverflow.com/questions/50945/can-you-do-a-partial-checkout-with-subversion – pmod Jul 08 '11 at 18:26

4 Answers4

3

What you need is not to ignore these folders (since ignoring means setting them out of repository), but to control the depth of checkout.

You can checkout your root with --depth immediates option this will only checkout subfolders of the root dir. Then go inside and do the same with folders you need or checkout with --depth infinity directory you are interested in.

PS GUI svn clients like TortoiseSVN make this process more convenient.

pmod
  • 10,450
  • 1
  • 37
  • 50
3

If you're checking things out fresh, use pmod's answer to avoid downloading the GBs. If you've already got a working copy, you can reset the depth with:

svn update --set-depth empty <dir>
Michael Brewer-Davis
  • 14,018
  • 5
  • 37
  • 49
  • Thank you for addition. The arguments for --set-depth are: empty, files,immediates,infinity and exclude (http://code.google.com/p/svnbook/issues/detail?id=78) – pmod Jul 08 '11 at 18:29
  • 1
    Or ``svn update --set-depth exclude`` to exclude the directory instead of keeping it empty. (Requires Subversion 1.6+ for directories or a 1.7 alpha+ for excluding individual files) – Bert Huijben Jul 11 '11 at 16:26
2

I'm not sure you can do exactly what you describe, but you can definitively do the opposite: checkout only the directories you need. The feature is called Sparse Directories.

Álvaro González
  • 142,137
  • 41
  • 261
  • 360
1
svn propset svn:ignore <dir>

Will ignore the dir.

Grammin
  • 11,808
  • 22
  • 80
  • 138
  • If I tell it to ignore a directory, and then delete that directory, won't the flag to ignore that directory go away? I want to make sure it doesn't re download the next time I svn up. – Fuego DeBassi Jul 08 '11 at 15:35
  • If you don't make changes to the directory it will never download after the initial checkout. Svn up copies the "changes" that are in your repository into your local checkout not the whole repository itself. – Grammin Jul 08 '11 at 15:42
  • If you do this, you'll need to be careful never to check in the property change. – Michael Brewer-Davis Jul 08 '11 at 17:58
  • This will ignore an unversioned directory, but this one is not unversioned. – Bert Huijben Jul 11 '11 at 16:24