You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Mark-E <me...@hbs.edu> on 2012/03/15 14:05:42 UTC

Question on checking out multiple projects

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?

Regards,
Mark
 
-- 
View this message in context: http://old.nabble.com/Question-on-checking-out-multiple-projects-tp33509611p33509611.html
Sent from the Subversion Users mailing list archive at Nabble.com.


Re: Question on checking out multiple projects

Posted by Les Mikesell <le...@gmail.com>.
On Thu, Mar 15, 2012 at 8:05 AM, Mark-E <me...@hbs.edu> wrote:
>
> 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?

You probably can't do that in a single command, but it shouldn't be
too hard to get the list of projects with
svn ls https://repository/Archive/projects
and iterate through it with an svn co $path/trunk

-- 
   Les Mikesell
    lesmikesell@gmail.com

Re: Question on checking out multiple projects

Posted by Stefan Sperling <st...@elego.de>.
On Thu, Mar 15, 2012 at 05:40:23PM +0400, Konstantin Kolinko wrote:
> 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.

You can also use --depth empty in the first command to avoid having
all immediate children in the working copy.

An "svn update --set-depth infinity foo" of a child directory 'foo'
will still work. You'll just need know the name of the child. You can see
the list of children with 'svn ls' even in a depth=empty checkout.

See also the entry in the 1.7 release notes which talks about the new
"svn up --parents" option that makes pulling in children of children
a little easier: http://subversion.apache.org/docs/release-notes/1.7.html#update-parents

Re: Question on checking out multiple projects

Posted by Mark-E <me...@hbs.edu>.
>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


Thanks for the tips Konstantin, I appreciate the help. I'll give it a try.

Regards,
Mark


-- 
View this message in context: http://old.nabble.com/Question-on-checking-out-multiple-projects-tp33509611p33510088.html
Sent from the Subversion Users mailing list archive at Nabble.com.


Re: Question on checking out multiple projects

Posted by Konstantin Kolinko <kn...@gmail.com>.
2012/3/15 Mark-E <me...@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