Kerrek SB
Kerrek SB

Reputation: 477650

Skip directory in SVN checkout? (Partial checkout)

Suppose a remote SVN repository has this structure:

/project
        /src
        /bulk

Now for some reason I already have a copy of bulk (assumed unchanging or rarely changing) elsewhere on my machine. Can I somehow checkout a new copy of the repository, but pre-provide the bulk directory so it doesn't get downloaded again?

To clarify, this hypothetical process should certainly check the checksums on the files in the bulk directory and update those files which aren't correct, so that ultimately I'll have a complete, consistent checkout. I just want to shortcut past downloading those files which I already have verbatim.

Upvotes: 15

Views: 19053

Answers (3)

Juuso Ohtonen
Juuso Ohtonen

Reputation: 9692

Instructions when using TortoiseSVN 1.7 and newer:

  1. "SVN Checkout" to /project, specifying "Checkout Depth" as "Only this item"
  2. "SVN Checkout" to /project/trunk, specifying "Checkout Depth" as "Fully recursive"

Upvotes: 1

Adam Ralph
Adam Ralph

Reputation: 29955

  1. Checkout /project, specifying the depth to be 'empty'.
  2. Update /project/src specifying infinite depth.
  3. Copy your current bulk working copy into the project directory working copy.

e.g.

svn checkout --depth empty http://svnserver/project/ project
svn update --set-depth infinity project/src
// copy your current /bulk into /project

Note - this takes advantage of the sparse directories feature introduced in Subversion 1.5.

Upvotes: 27

Steve Rukuts
Steve Rukuts

Reputation: 9377

Last time I had to do this, I had an enormous number of demo files in a directory, and I just moved these to a new directory out of trunk.

You might consider doing something similar, and adding bulk to svn:ignore, if you need bulk to be in the same directory.

Upvotes: -1

Related Questions