Search code examples
svn

only fully recursive checkout includes externals


I am checking out an SVN repository including externals (svn:externals property).

But, apparently, if I use --depth with any value other than 'infinity', the externals are not downloaded. This is especially ironic, since apparently it is possible to update later with --set-depth exclude and exclude folders later.

Is it possible to check out selectively and include all externals?


Solution

  • I have the same problem and I don’t have any real answer except the workaround checking out the externals manually afterwards.

    mkdir wc
    svn co http://example.com/svn/repo/trunk wc --depth=immediates
    cd wc
    svn co http://example.com/svn/extrepo external --depth=empty
    

    But obviously, this defeats the whole purpose of externals.

    This behavior was reported in the Subversion issue tracker as Issue 3311, where it was noted

    This was an explicitly defined feature. (There is code to check for this condition and then explicitly skip handling)

    (However, the issue was not closed and still has Status: NEW.)

    And I was not able to find any explicit reason for this “feature”, I found only the commit which introduced it by swapping checks for the old --non-recursive option with a check for depth == svn_depth_infinity, which is a bit too strict, I would say, but it has essentially stayed there ever since.