0

Say, I have checkout a empty branch

foo/

and, I want to simply checkout only a particular subdirectory somewhat deep inside, say

foo/1/2/3/4

I am only interested in checkout the full subdirectory 4, nothing else.

I tried

svn up foo/1/2/3/4 

but it didn't work, gives error

Can't create directory 'foo/1/2/3/4': No such file or directory

How do I make it work if the subdirectory 1 is locally non-existent to begin with? Do we have to do separate svn up for each subdirectory one by one?

Note that:

svn up foo/1 

works!

Community
  • 1
  • 1
Saurav Sahu
  • 13,038
  • 6
  • 64
  • 79

1 Answers1

0

My solution for the case when the parent directories (in above case 1, 2, 3) are non-existent.

Actually svn up works only upto one level. That's if foo is existing (and is empty), then we can do update only upto svn up foo\1, and no svn URL is required.

That would mean checking out all sub-directories and files under foo\1, which we don't really want, as it may be huge in size.

Instead the simple solution is to do

svn co svn-url-to-subdirectory path-to-subdirectory
Saurav Sahu
  • 13,038
  • 6
  • 64
  • 79