tags:

views:

295

answers:

1

If I have a SVN project set up like so:

Project
-- Subdirs
   -- A
      -- A1.txt
      -- A2.txt
      -- A3.txt
   -- B
      -- B1.txt
      -- B2.txt
      -- B3.txt

Is it possible to use externals to combine the contents of the A and B subdirectories into a single directory elsewhere, so I'd have:

Project
-- Subdirs
   -- A
      -- A1.txt
      -- A2.txt
      -- A3.txt
   -- B
      -- B1.txt
      -- B2.txt
      -- B3.txt
-- CombinedViaExternals
      -- A1.txt
      -- A2.txt
      -- A3.txt
      -- B1.txt
      -- B2.txt
      -- B3.txt
+1  A: 

It is possible to do so since Subversion 1.6 ( release notes), but note the restrictions:

  • The path to the file external must be in a working copy that is already checked out. While directory externals can place the external directory at any depth and it will create any intermediate directories, file externals must be placed into a working copy that is already checked out;
  • The file external's URL must be in the same repository as the URL that the file external will be inserted into; inter-repository file externals are not supported;
  • While commits do not descend into a directory external, a commit in a directory containing a file external will commit any modifications to the file external.
Robert Munteanu
It looks like you're talking about file externals, not directory externals. I'm assuming I would have to apply those properties to each file, which is not what I'm trying to do.
Brown
Well, yes :-) Directory externals are specified per-directory, while you're trying to 'fold' multiple directories into one. Would a scripting-based approach be useful?
Robert Munteanu
A scripting-based approach may very well be the answer I'm looking for. We're currently investigating a switch from SourceSafe to SVN. Our build procedure uses a large number of shared files, and externals seemed to be the most direct route.
Brown