如何在我的 Subversion 工作副本中添加可选的附加文件或忽略的文件?
我通常会使用符号链接将这样的文件连接到项目根目录之外,其中可选文件可以链接到单独的存储库 URL。问题是,现在我有大量文件和目录,它们必须与存储库中的其他文件驻留在同一目录中,而我选择不希望这些文件和目录存在于某些工作副本中。我真的不想为所有这些文件和目录创建符号链接。我想知道是否有更好的方法。
我认为一个例子可以最好地解释它:(WC代表工作副本)
WC1:
- dir_1
- file_1
WC2:
- dir_1
- file_1
但是我还有2个工作副本我想保持连接,其中包含前2个的所有文件,另外我需要仅出现在工作副本 3 和 4 中的其他一些文件:
WC3:
- dir_1
- dir_2
- file_1
- file_2
WC4:
- dir_1
- dir_2
- file_1
- file_2
我希望能够在 WC3 和 WC4 中提交对 file_1 或 dir_1 的修改,并能够使用这些提交更新 WC1 和 WC2。我还希望它在另一个方向上工作,以便可以在 WC3 和 WC4 中更新提交给 WC1 或 WC2 的修改。我希望能够让 file_2 和 dir_2 存在于 WC3 和 WC4 上,但不存在于 WC1 和 WC2 上(并且我不希望 WC1 和 WC2 知道或注意到它们的修改)。我还希望能够在 WC3 或 WC4 上提交对 file_2 或 dir_2 的修改,并在具有这些文件(WC3 或 WC4)的其他工作副本上更新这些提交。
有没有办法为每个工作副本设置不同的目录属性?因此,我们的想法是忽略特定工作副本上的文件和目录集合,同时保持在其余工作副本上更新它们的能力?只是一个想法..
有道理吗?我该怎么做?
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
- 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
最好通过在存储库级别上拆分它并为这些 WC 使用不同的 URL 来实现此目的(我认为这是唯一可行的方法)。通过使用 SVN svn:externals 属性,您可以合并您需要的文件/目录。
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.
您以任何方式询问并希望 SVN 不可能实现
您可以尝试在某种程度上使用单独的分支 (TBT) 进行 1+2|3+4 的模拟
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