0

I am using SVN. I want to have external file in my working copy. I have a folder with files from my repository. And I also want to have one file from external third party repository.

SVN externals can be used for folders only.

Since version 1.6 externals for files are supported, but for the files in the same repository only.

How to workaround this limitation? Which approaches, practices, tricks whatsoever could be used for this situation?

Facundo Casco
  • 10,065
  • 8
  • 42
  • 63
sergtk
  • 10,714
  • 15
  • 75
  • 130

2 Answers2

2

svn:externals can be used for files since Subversion 1.6:

If the URL in a svn:externals description refers to a file, it will be added into the working copy as a versioned item.

note the differences to directoy externals [1, 2].

ax.
  • 58,560
  • 8
  • 81
  • 72
  • good feature, but it is not exactly what I am looking for. From feature description: "The file external's URL must be in the same repository as the URL that the file external will be inserted into", but my file is in other repository – sergtk Feb 27 '11 at 17:18
1

Can you place that one file in it's own directory in the other repository, then use svn:externals to the folder with just the file you are interested in?

RepoA
    - ComponentDir
        - ComponentA

RepoB
    - ComponentDir (svn:externals to RepoA/ComponentDir)
        - ComponentA

In reality, how often do you expect this component to change? Why not just commit it independently and not worry about an external feature at all?

vcsjones
  • 138,677
  • 31
  • 291
  • 286
  • In reality such cases will not appear frequently for sure. Now I am trying to find most clean solution. And in any case I will implement some kind of workaround. The component has some unusual structure: all but one file are in one folder and one (config) file is "near" this folder. – sergtk Feb 27 '11 at 17:41