Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 637
Kerrek SB Avatar asked Dec 11 '11 23:12

Kerrek SB


People also ask

How do I ignore a folder in svn?

Set the svn:ignore property of the parent directory: svn propset svn:ignore dirname . If you have multiple things to ignore, separate by newlines in the property value.

How do I ignore target folder in svn?

To ignore files in subversion you want to set the svn:ignore property. You can see more here http://svnbook.red-bean.com/en/1.8/svn.advanced.props.special.ignore.html about half way down. svn propset svn:ignore target .

How remove checked out folder from svn?

Just delete your complete local checked-out working copy (including all . svn directories). This will not modify your repository as you are not committing your deletion.

Can I delete .svn folder?

To remove a file from a Subversion repository, change to the directory with its working copy and run the following command: svn delete file… Similarly, to remove a directory and all files that are in it, type: svn delete directory…


2 Answers

  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.

like image 176
Adam Ralph Avatar answered Oct 05 '22 01:10

Adam Ralph


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"
like image 35
Juuso Ohtonen Avatar answered Oct 04 '22 23:10

Juuso Ohtonen