You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by cj91 <Jo...@argushealth.com> on 2008/10/03 20:06:08 UTC

Checkout trunk revisions of projects in a multi project repo?

Hello everyone,

I have search far and wide on the internet for an answer to this question.
We have a single subversion repository with multiple projects:

Repo
 +--Proj1
 |     +--trunk
 |     +--tags
 +--Proj2
 |      +trunk
 |     +tags
 +--Folder
      +--Proj3
       |    +--trunk
       |    +--tags
      +--Proj4
       |    +trunk
       |    +tags

We have Hundreds of projects in our repository in nested folders. Is there a
way I can checkout the trunk versions of all the projects in the repo? I'm
not interested in the tagged or branched versions, just the trunk.

Thank you,
-Jonathan
-- 
View this message in context: http://www.nabble.com/Checkout-trunk-revisions-of-projects-in-a-multi-project-repo--tp19804685p19804685.html
Sent from the Subversion Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

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

Posted by John Niven <jn...@bravurasolutions.com>.
> -----Original Message-----
> From: Ryan Schmidt [mailto:subversion-2008c@ryandesign.com]
> Sent: Saturday, 4 October 2008 10:36
> To: cj91
> Cc: users@subversion.tigris.org
> Subject: Re: Checkout trunk revisions of projects in a multi
> project repo?
>
> On Oct 3, 2008, at 3:06 PM, cj91 wrote:
>
> > ...snip...
> >
> > We have Hundreds of projects in our repository in nested folders.
> > Is there a
> > way I can checkout the trunk versions of all the projects
> in the repo?
> > I'm not interested in the tagged or branched versions, just
> the trunk.
>
> You're supposed to issue a separate "svn checkout" command
> for each trunk that you would like to work on.
>
> svn checkout $REPO/Proj1/trunk
> svn checkout $REPO/Folder/Proj4/trunk
>
> And so on. Surely you don't need to work on all several
> hundred projects simultaneously? Check them out as you need them.

Or, if you feel you really must check them out in one big working copy, SVN 1.5 allows sparse checkouts - you'd checkout root specifying "--depth=immediates" and then update the trunks, specifying "--depth=infinity"

If it were me I'd want separate working copies, though - easier to keep different projects in different working copies.

Cheers
John

>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


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

Posted by David Weintraub <qa...@gmail.com>.
On Mon, Oct 6, 2008 at 9:16 AM, Fisher, Jonathan
<Jo...@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@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

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

Posted by John Niven <jn...@bravurasolutions.com>.
> -----Original Message-----
> From: Fisher, Jonathan [mailto:Jonathan.Fisher@argushealth.com]
> Sent: Tuesday, 7 October 2008 02:16
> To: Ryan Schmidt
> Cc: users@subversion.tigris.org
> Subject: RE: Checkout trunk revisions of projects in a multi
> project repo?
>
> 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?
>

You can script SVN with whatever scripting mechanisms are available to you - Bash, for example.  I've mostly scripted SVN with Ant, using the svnant Ant tasks provided by subclipse.  SVN bindings are available for a range of scripting languages including Python, which I've also used.

Also see my earlier reply: with SVN 1.5 you can do sparse checkouts, avoiding  a full checkout of your tags directories.

Cheers
John

> Thank you for the reply,
> -Jonathan
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


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

Posted by "Fisher, Jonathan" <Jo...@argushealth.com>.
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?

Thank you for the reply,
-Jonathan 

-----Original Message-----
From: Ryan Schmidt [mailto:subversion-2008c@ryandesign.com] 
Sent: Friday, October 03, 2008 4:36 PM
To: Fisher, Jonathan
Cc: users@subversion.tigris.org
Subject: Re: Checkout trunk revisions of projects in a multi project
repo?

On Oct 3, 2008, at 3:06 PM, cj91 wrote:

> I have search far and wide on the internet for an answer to this 
> question.
> We have a single subversion repository with multiple projects:
>
> Repo
>  +--Proj1
>  |     +--trunk
>  |     +--tags
>  +--Proj2
>  |      +trunk
>  |     +tags
>  +--Folder
>       +--Proj3
>        |    +--trunk
>        |    +--tags
>       +--Proj4
>        |    +trunk
>        |    +tags
>
> We have Hundreds of projects in our repository in nested folders.  
> Is there a
> way I can checkout the trunk versions of all the projects in the repo?

> I'm not interested in the tagged or branched versions, just the trunk.

You're supposed to issue a separate "svn checkout" command for each
trunk that you would like to work on.

svn checkout $REPO/Proj1/trunk
svn checkout $REPO/Folder/Proj4/trunk

And so on. Surely you don't need to work on all several hundred projects
simultaneously? Check them out as you need them.



"EMF <argushealth.com>" made the following annotations.
------------------------------------------------------------------------------
PRIVILEGED AND CONFIDENTIAL
This email transmission contains privileged and confidential information intended only for the use of the individual or entity named above.  If the reader of the email is not the intended recipient or the employee or agent responsible for delivering it to the intended recipient, you are hereby notified that any use, dissemination or copying of this email transmission is strictly prohibited by the sender.  If you have received this transmission in error, please delete the email and immediately notify the sender via the email return address or mailto:postmaster@argushealth.com.  Thank you.



==============================================================================


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


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

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Oct 3, 2008, at 3:06 PM, cj91 wrote:

> I have search far and wide on the internet for an answer to this  
> question.
> We have a single subversion repository with multiple projects:
>
> Repo
>  +--Proj1
>  |     +--trunk
>  |     +--tags
>  +--Proj2
>  |      +trunk
>  |     +tags
>  +--Folder
>       +--Proj3
>        |    +--trunk
>        |    +--tags
>       +--Proj4
>        |    +trunk
>        |    +tags
>
> We have Hundreds of projects in our repository in nested folders.  
> Is there a
> way I can checkout the trunk versions of all the projects in the  
> repo? I'm
> not interested in the tagged or branched versions, just the trunk.

You're supposed to issue a separate "svn checkout" command for each  
trunk that you would like to work on.

svn checkout $REPO/Proj1/trunk
svn checkout $REPO/Folder/Proj4/trunk

And so on. Surely you don't need to work on all several hundred  
projects simultaneously? Check them out as you need them.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org