Reputation: 4165
I have a working copy of a SVN repository. C:\myrepo
on my computer points to https://example.com/svn
. It has a subfolder in it, /foo/bar
. This folder is really big and it's a remote repository, so checking it out again would take a very long time. I'd like to give my colleague a working copy of just /foo/bar
, not the whole repository (because the whole repository is even bigger and contains a bunch of stuff that will confuse them).
I can make a copy of my working copy, C:\myrepo-bar
and then use svn switch https://example.com/svn/foo/bar
but it says there's no common ancestry (which is true) and so (if I force it) it checks out the whole folder again.
Is there any way to get around this and get a working copy of just https://example.com/svn/foo/bar
given that I have a working copy of https://example.com/svn
already? I'm using tortoiseSVN but I'm comfortable enough using SVN on the command line.
Upvotes: 0
Views: 30
Reputation: 8905
That depends. In general: no. SVN working copies are not like Git or Mercurial repositories; they do not contain any history or other information that is contained in the repository, only a copy of the selected version of the files.
If, however, you are using an old version of the SVN client, a version old enough to put a ".svn" directory in every subdirectory of your project, then you may be able to just copy the subdirectory (including the .svn directory inside). I'm not sure if this will have consequences with username or whatever, I only ever did that for my own use. And, recent versions of the client have removed the .svn directory from all but the working-copy root, so this is not an option for recent clients.
Upvotes: 1