I normally would connect files like this with a symlink to outside the project root, where the optional files can be linked to a separate repo URL. The trouble is that now I have a large collection of files and directories that must reside in the same directories as other files that are in the repo, which I optionally do not want to exist in certain working copies. I really do not want to make symlinks for all those files and directories. I was wondering if there was a better way.
I think an example might explain it best: (WC stands for working copy)
WC1:
- dir_1
- file_1
WC2:
- dir_1 开发者_如何学JAVA
- file_1
BUT THEN I also have 2 more working copies that I want to keep connected that have all the files of the first 2, PLUS some more files that I need to ONLY appear in working copies 3 and 4:
WC3:
- dir_1
- dir_2
- file_1
- file_2
WC4:
- dir_1
- dir_2
- file_1
- file_2
I want to be able to commit modifications to file_1 or dir_1 in WC3 and WC4 and be able to update WC1 and WC2 with those commits. I also want it to work in the other direction so that modifications committed to WC1 or WC2 can be updated in WC3 and WC4. I want to be able to have file_2 and dir_2 exist on WC3 and WC4 but not on WC1 and WC2 (and I do not want WC1 and WC2 to know or notice modifications of them). I also want to be able to commit modifications to file_2 or dir_2 on either WC3 or WC4 and update those commits on the other working copies that have those files (WC3 or WC4).
Is there a way to have the properties of a directory set differently per working copy? So the idea would be to ignore the collection of files and directories on SPECIFIC working copies while maintaining the ability to update them on the rest? Just a thought..
Make sense? How do I do this?
It's better to achieve this by splitting it on repository level and using different URLs for these WCs (and I suppose this only way it is doable). By using SVN svn:externals property you are able to combine files/dirs you need.
/shared1
dir_1
file_1
/shared2
dir_2
file_2
/proj1 -> external to /shared1
/proj2 -> external to /shared2
/proj3 -> external to /shared1
-> external to /shared2
/proj4 -> external to /shared1
-> external to /shared2
You ask and want impossible for SVN in any way
You can try emulate to some degree using separate branches (TBT) for 1+2|3+4
精彩评论