3

I have a bunch of interconnected projects which share the same project tree. I'm looking for a version control system which provides a possibility to checkout a subset of the project tree.

If my the full project tree looks like this:

Project Root
 |-Feature1
 |  |-SubFeature11
 |  \-SubFeature12
 |-Feature2
 |  |-SubFeature21
 |  \-SubFeature22
 |-file1
 \-file2

I want be able to checkout only subset like this:

Project Root
 |-Feature1
 |  \-SubFeature12
 |-Feature2
 |  \-SubFeature22
 |-file1
 \-file2

So do you know any version control system that allows to do selective checkout or a view on a repository?

Yossi
  • 11,778
  • 2
  • 53
  • 66
  • Am I missing something? When you checkout a single file, it is a subset of the tree. Can you rephrase your question? – Oded Jun 09 '10 at 18:51

2 Answers2

3

SVN supports this, search for sparse directories.

If you're using tortoise svn what you should do is check out the root directory not recursively then open the repository browser, find the directory you want to add and right-click -> update to revision.


Edit: With later versions of tortoise (I don't remember starting with which version but definitely but if you're reading this then the current version includes it) it's much easier, just click the Choose Items... button when performing a recursive checkout.

Screenshot

Motti
  • 110,860
  • 49
  • 189
  • 262
  • With sparse checkout I will lose the ability to update the project using default tools like command line `svn` and GUIs. – Yossi Jun 09 '10 at 19:04
  • 2
    Not true, Yossi. Sparse checkouts are a native part of Subversion, and clients should work just fine with it. In particular, "svn update" will only update those directories & files that are part of the sparse checkout. – Matt Dillard Jun 09 '10 at 19:09
  • @Matt, thanks for pointing that out. I have completely missed this feature. – Yossi Aug 31 '10 at 06:17
1

As of version 1.7.0, Git supports sparse checkouts, too. Create a configuration file .git/info/sparse-checkout and store the paths to the subprojects you want to be part of this checkout. See also these related questions for details.

Community
  • 1
  • 1
krlmlr
  • 25,056
  • 14
  • 120
  • 217