SVN external file workaround

邮差的信 提交于 2019-12-11 23:38:08

问题


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?


回答1:


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




回答2:


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?



来源:https://stackoverflow.com/questions/5134566/svn-external-file-workaround

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!