Is it possible to link SVN repository files so tha

2019-01-11 16:44发布

问题:

I can see some potential difficulties with this concept but the idea is:

I change a file in Repository A and commit, Repository B has a file that is a link to a file in Repository A, I click update on the file in my working copy for repository B, and i receive the updated file from repository A.

回答1:

Yes, for directories anyway

See this section on svn externals. The svn:externals property is set on a versioned directory; its value is typically another versioned directory in a repository (possibly the same one) of your organization. They act in the end something like symbolic links.

Update: Good call also by basszero but note that the questioner almost certainly does not have an svn 1.6 repo, so he can't do it with files.



回答2:

If you're lucky enough to use subversion 1.6, you can have external links for both directories AND files



回答3:

Check out this post..
It helped me
how to properly set svn svn externals property in svn command line

For those who dont want to follow the link here is a brief overview.

svn propset svn:externals 'akismet http://plugins.svn.wordpress.org/akismet/trunk' .
  • akismet - dir or file name you want your link to be called
  • http://plugins.svn.wordpress.org/akismet/trunk - The link to the svn repo you want to link to
  • . - The current directory so make sure your in the dir you want the link to reside

After running the above do a

svn commit

and

svn update


回答4:

This is easy to do with "external" links in your subversion repository.

Personally I find this is very useful for incorporating open source libraries into my code (Codeplex, Google Code, etc...).

Search for "svn:externals" to find documentation on the details



标签: svn