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

Re: Checkout trunk revisions of projects in a multi project repo?

From: David Weintraub <qazwart_at_gmail.com>
Date: Mon, 6 Oct 2008 22:40:43 -0400

On Mon, Oct 6, 2008 at 9:16 AM, Fisher, Jonathan
<Jonathan.Fisher_at_argushealth.com> wrote:
> Well, unfortunately I do. We are setting up an opengrok server and need
> the entire codebase checked out initially. Does svn have some sort of
> scripting mechanichism this could be accomplished with?

Are you on a Unix system? You could easily write a shell script to
accomplish this task, or use a scripting language like Perl, Python,
or Ruby.

Just off the top of my head:

    $ svn ls -R svn://localhost/Repos | grep "trunk/$"

will list out all the projects.

A little more work:

svn ls -R svn://localhost | egrep -i "(TRUNK|MAIN)/$" | while read line
do
    project=$(echo $line | sed -n 's~\([^/]*\)/trunk~\1~p')
    echo "svn co http://localhost/Repos/$line $project"
done

Should print out a series of svn co commands. If these commands are
correct, use this script:

svn ls -R svn://localhost | egrep -i "(TRUNK|MAIN)/$" | while read line
do
    project=$(echo $line | sed -n 's~\([^/]*\)/trunk~\1~p')
    svn co http://localhost/Repos/$line $project
done

--
David Weintraub
qazwart_at_gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-10-07 04:41:06 CEST

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.