Search code examples
svnsvn-externals

Can svn:externals be used while ignoring externals for that URL?


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...


Solution

  • 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.