[svk-users] Can only switch checkout root - WHY?

Rush Manbert rush at manbert.com
Wed Sep 12 01:26:57 EDT 2007


Jared Hardy wrote:
> On 9/11/07, Rush Manbert <rush at manbert.com> wrote:
> 
>>Thanks for the explanation. You're right about what I'm doing, which is
>>why the original checkout sub-folders are empty. I guess I'm stuck with
>>SVN for the client. :-(
> 
> 
> Why are you stuck with SVN? If the sub-folders of the base branch are
> empty, then checking out the sub-folders with SVK from the alternate
> "platform branches" should be trivial, and wont create merge issues
> down the line. You just have to change your scripts to checkout and
> update the root folder and each sub-folder individually, which
> shouldn't be a big deal. You just don't want to allow any
> add/commit/push actions to happen on the sub-folders from the root.
> 

Well, maybe I'm not. Let's see.

My project consists of client, common, and server top level directories 
that are siblings. When a developer does a checkout, they usually want 
to checkout either client plus common or server plus common. Some 
developers need to checkout all three. And sometimes they only checkout 
two of them, but later need to add the third one.

I would like to arrange it so that after a checkout, there is a top 
level directory that is under version control, and it contains all of 
the subsystem directories. Something like this:

checkoutTop
- client
- common
- server

I want the subsystem directories that were actually checked out to be 
populated, and all others to be empty.

I want a developer to be able to do the following:
1) Update at the checkoutTop level and have it update everything in the 
tree below it
2) Checkout a directory that was originally empty. Say I checked out 
client and common originally, but now I need server. I want to be able 
to check out server.

In addition to this, both my client and common subsystems contain 
platform-specific content. The client tree, for instance, looks like this:
client
- ourCode
- thirdPartyLibs
   - installedMac
   - installedWin32
   - sources

The "installedXxx" subdirectories contain about 500 MB each, so I only 
want to get the platform-specific content when I checkout the client 
subsystem. I also don't normally need the sources, but if I'm debugging 
and need to step into the libraries, then I will need to get the sources 
too.

I want to be able to do the following:
1) Checkout the platform-specific library installations with the rest of 
the subsystem.
2) Checkout the sources at a later time if I find that I need them.

I understand how to do all of this by having empty directories in the 
repository tree, then switching the empty sub-directories to point at 
the real content. I have added metadata to the empty directories so that 
I can have scripts that do the switching correctly. IN general I need a 
script to do the initial checkout, then a switch script to "add" a 
sub-directory that I didn't originally get (and was therefore originally 
empty). Otherwise, updates can be done via svn up, and subversion GUI 
clients work with the working copy tree.

I don't see how to do the equivalent with multiple checkouts. If I 
understand correctly, I cannot, for instance, checkout my empty client, 
common, and server directories, then do another checkout over each of 
them. (Because I can't do a checkout over a sub-directory that is under 
revision control) Do I have the wrong picture? I've only been studying 
Subversion and SVK for a while, so may have some incorrect notions.

Thanks,
Rush


More information about the svk-users mailing list