[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn usage tips

From: David Weintraub <qazwart_at_gmail.com>
Date: Tue, 2 Mar 2010 17:57:15 -0500

On Tue, Mar 2, 2010 at 2:31 PM, Paul Decker <kg7hf_at_comcast.net> wrote:
> I am talking about checking out a single project, however the "projects" all
> use the same folders, like shared folders.  So when you do a get on the top
> level, you get all the files for every project rather than just the files
> for the project of interest
>

What does your repository directory structure look like? I don't need
a detailed picture. Just an overview.

It sounds like you're saying that the structure looks like this:

/project1
/project2
/project3
/common1
/common2
/common3
/common4

If you are working on /project1, you need to checkout folders
/common1, /common2, /common3, /common4 too.

If that's the case, you'll need to use --depth:

$ # Checks out the root project, but no folders
$ svn co --depth=empty svn://subversion/ workspace-project1
$ cd workspace-project1

$ #Now we have to "update" the missing folders
$ svn update --set-depth=infinity project1 common1 common2 common3 common4

This will checkout your project, and the needed shared folders. When
you do an update, it won't "update" the missing stuff.

A better way is to use "externals". Take a look at
<http://svnbook.red-bean.com/en/1.5/svn.advanced.externals.html>. This
is the way shared folders are suppose to be used. That way, you can
set the version of the shared folder with the project. For example, it
is possible that the latest version of the shared folder might not be
compatible with the version of the project.

This way, you can checkout project1 and all the common folders will
automatically be checkout too.

-- 
David Weintraub
qazwart_at_gmail.com
Received on 2010-03-02 23:57:52 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.