views:

246

answers:

4

Is it possible to ignore external dependencies for a tag referenced in an svn:externals property? This may sound like a very strange question, but let me explain...

I have a rather large collection of individual and "pluggable" code modules, each of which can be independently tested, compiled, and developed as a standalone project. Some of these modules depend on other modules, via the svn:externals property. The problem is that our testing framework, gtest, is also a dependency of each module and includes a static library for the test suites, which means that each module is at least ~15Mb, since we have built these static libraries for multiple platforms.

In any case, this means that a relatively simple project can take upwards of 200Mb of disk space when checked out, and most of this is thanks to duplicate copies of gtest from each module. Some of my colleagues are now starting to complain about the bloated size of the working copies, and it would be nice to cut this down by simply including the gtest dependency at the top level of each module and including only that copy in the build.

Basically, I want a way to set svn:externals in my proplist, but check out each of those dependencies as if I were to pass "--ignore-externals" to svn co. Is this possible? I have a feeling not, but it's worth asking...

A: 

This SO question may be helpful.

David Dean
Thanks -- I hadn't found that one. Unfortunately it doesn't really solve my problem. I think that what I want to do probably isn't possible, at least with SVN, so I'll probably end up just telling my colleagues to deal with it and clean their hard drives. :)
Nik Reiman
A: 

I don't know of any way to make svn skip a single dependency.

But I think you can solve this in another way by making tagged releases of these modules without the shared dependency. The other dependent modules can then point their svn:externals to these tags instead of to the independently-compiling branches.

I only suggest this because it sounds like you have a very specific problem with a single large shared library. Anything more complicated and you are probably not going to be able solve this with svn:externals alone.

Michael
How do you make a tagged release without the dependencies?
Nik Reiman
A: 

Subversion as of 1.6.0+ can use svn:externals referencing a file rather than a directory. This may help?

Si
+2  A: 

I would recommend looking at sparse checkouts. Checkout just the top directory (with the 'only this item' option), getting the externals. Then, for every module you want, you can update the WC with the desired directory, but omitting externals for it. Repeat for all subprojects.

you may still have to put the gtest dependency on another folder in your repo, but I think it might work for you.

gbjbaanb