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

Re: Checkouts of subsets of the tree

From: Mark Bohlman <mbohlman_at_tcicredit.com>
Date: 2004-06-25 19:09:53 CEST

Garrett Rooney wrote:
> On Fri, 25 Jun 2004 12:32:57 -0400, Mark Bohlman <mbohlman@tcicredit.com> wrote:
>
>
>> What would be nice would be something like a concrete example of
>>being able to get from two repositories a working set of code. Say I'm
>>using Java, and want to get the source we develop out of
>>http://repos/trunk/src and the needed vendor jars out of
>>http://vendor/jars. In my working copy I'd want to be able to do a
>>"svn co http://repos/trunk/src" and then run ant or make to do a full
>>build, picking up the needed jars/libraries into the proper location.
>>Or a similar such scenario, for C/C++ or whatever.
>>
>> Having a concrete example to follow on doing something like this
>>would really help make it clear what was needed by the user, and I think
>>a lot of us using Subversion would benefit.
>
>
> One way to do what you seem to be looking for might be something like
> this. Note that this is not using svn:externals (I'm not a big fan of
> it honestly), and it does introduce another step into the checkout
> process, although that could be scripted pretty easily.
>
> your top level repository layout looks like this:
>
> /
> trunk/
> libs/
> libs/
> win32/
> macosx/
>
> So your top level directory has a 'trunk' directory that holds your
> main project. Then there's also a top level 'libs' directory, and
> inside that are subdirectories for each operating system you support.
> Inside each of those you would put system dependent libraries. Within
> the trunk there's an empty libs directory that you will replace with
> the appropriate platform specific libs subdirectory. The checkout
> process looks like this:
>
> $ svn co file:///tmp/repos/trunk foo
> A foo/libs
> Checked out revision 3.
> $ cd foo
> $ svn switch file:///tmp/repos/libs/win32 libs
> At revision 3.
> $ svn st
> S libs
> $ svn info libs | grep URL
> file:///tmp/repos/libs/win32
> $
>
> So first you check out the trunk, then you switch the platform
> specific subdirectory to whatever is appropriate for your current
> platform. Is this close to what you were looking for?
>
> -garrett

Garrett,

    While this does work it seems a bit overly complex with the switch.
  One thing that I neglected to mention previously was the reason for
the separate repository - this was done so that our nightly backup
process is minimized to our own source code. I'll only do a
intermittent backup of third party libraries (just in case - more for
the speed of any needed restore). Having externals functioning will
allow me to completely separate the repositories to different locations
and only worry about my own source for the backups, and not jars,
libraries, and documentation. My 3 repositories now are 2+ G in size
and the nightly backups will get expensive quickly, as well as consuming
my operational window.

    The other goal here is to be able to blow away a build area (e.g.
make|ant clean) and start fresh with the proper pieces in place.

Thanks,
-- mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Jun 25 19:12:55 2004

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.