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

Re: Question on checking out multiple projects

From: Konstantin Kolinko <knst.kolinko_at_gmail.com>
Date: Thu, 15 Mar 2012 17:40:23 +0400

2012/3/15 Mark-E <meramo_at_hbs.edu>:
>
> I am using OpenGrok as a search engine for SVN.
>
> I have an Archived section of obsolete code that users still want to be able
> to search.
> It is currently not searchable in our grok installation.
>
> The section is setup like this in SVN:
>
> Archive/project1/trunk
> Archive/project2/trunk
> Archive/project3/trunk
>
> What I would like to be able to do is use svn co to check out the trunk
> folder for each project without specifically issuing a co command for each
> project.
>
> Something like this maybe.....
>
> svn co https://repository/Archive/projects/*/trunk
>
> I have been doing a little research but I have not come across any
> documentation that helps me understand if this is possible or not.
> Does anyone know if this is possible using svn co and if so, what the proper
> syntax is?
>

That is not possible. But you may look into the "sparse checkout" feature.

To set it up you can
1) do "svn co --depth immediates" for the repository root
2) and follow it by "svn up --set-depth" for the subfolders that you
are interested in.

If you are on Unixes then you can use wildcards with "svn up", because
it operates on the local filesystem and unix shell does expand
wildcards there.

That would be something like the following (but read the docs first!)

svn co --depth immediates https://repository/Archive/ Archive
svn co up --set-depth immediates Archive/*
svn co up --set-depth infinity Archive/*/trunk

Warning: do not use "sparse checkout" if your server is 1.4.x or
older. It is not really supported by those old server versions.

Best regards,
Konstantin Kolinko
Received on 2012-03-15 14:40:57 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.