Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

svn repository checkout without branches

I have to checkout a repository that has 8 branches which I don't wont to download each branch size ~400MB. Only need to checkout the folder structure and the trunk.

repo/trunk
repo/tags/<do not download content of this directory>
repo/branches/<do not download content of this directory>

Any idea? Prefer command line use.

like image 836
Gihan Avatar asked Dec 16 '13 12:12

Gihan


People also ask

How do I checkout a repository in svn?

Check out files from Subversion repositoryIn the Get from Version Control dialog, click Add Repository Location and specify the repository URL. Click Check Out. In the dialog that opens, specify the destination directory where the local copy of the repository files will be created, and click OK.

How do I checkout code from svn to local repository?

SVN Checkout Create a folder where you will store project files. Right-click on the folder you created and select "SVN Checkout" (see image below). Enter the URL of your repository (something like "http://wiki.csc.calpoly.edu/307S07osos/svn"). Click on "OK".

How do I checkout a folder in svn?

Open the Repository Browser: Right-Mouse Button (RMB) on the newly created folder ==> TortoiseSVN ==> Repo-browser (or immediately Update to revision on a subfolder). Navigate to the folder you want to checkout completely. Press RMB on that subfolder, and select 'Update item to revision'. Press OK.

What is the difference between svn checkout and export?

svn export simply extracts all the files from a revision and does not allow revision control on it. It also does not litter each directory with . svn directories. svn checkout allows you to use version control in the directory made, e.g. your standard commands such as svn update and svn commit .


1 Answers

You want to use Subversion's sparse directories feature.

svn co --depth immediates URL_TO_REPOSITORY PATH_TO_WORKING_COPY
svn update --set-depth infinity PATH_TO_WORKING_COPY/trunk

Or, just check out the trunk directory, if you're not going to work with the tags or branches at all.

like image 193
alroc Avatar answered Sep 19 '22 06:09

alroc