[英]Handling projects which refer to multiple SVN repositories
We have several projects which we store in a single repository (let's call it repository A). 我们有几个项目存储在单个存储库中(我们称其为存储库A)。
Some of the projects in repository A, use files which are source controlled in another repository (let's call it repository B). 存储库A中的某些项目使用的文件在另一个存储库中受源代码控制(我们称其为存储库B)。
The relationship is never the other way around (Rep B does not use files from Rep A) 这种关系永远不会相反(Rep B不使用Rep A中的文件)
Right now, the way we handle these files is that we keep them in both repositories, and occasionally, we have someone merge the changes from the files in B, to A. 现在,我们处理这些文件的方式是将它们保存在两个存储库中,有时,有人将更改从B中的文件合并到A。
For example: In repository A: /tools/trunk/tool_A/main.cpp /tools/trunk/tool_A/secondary_screen.cpp ... /tools/trunk/tool_A/extra/Libraries/bob/bobs_magic_handler.h /tools/trunk/tool_A/extra/Libraries/frank/frank_tools.h 例如:在存储库A中:/tools/trunk/tool_A/main.cpp /tools/trunk/tool_A/secondary_screen.cpp ... /tools/trunk/tool_A/extra/Libraries/bob/bobs_magic_handler.h / tools / trunk /tool_A/extra/Libraries/frank/frank_tools.h
In repository B: /libraries/trunk/bob/bobs_magic_handler.h /libraries/trunk/bob/bobs_magic_handler_another_one.h ... /libraries/trunk/frank/frank_tools.h 在存储库B中:/libraries/trunk/bob/bobs_magic_handler.h /libraries/trunk/bob/bobs_magic_handler_another_one.h ... /libraries/trunk/frank/frank_tools.h
The number of files in B is quite large (tens of thousands), and the number of files A uses from B is small (tens) B中的文件数量很大(上万个),A从B中使用的文件数量很小(上万个)
Ideally, I think there would be someway to store information in repo A, that 理想情况下,我认为应该以某种方式将信息存储在存储库A中,
repoA::/tools/trunk/tool_A/extra/Libraries/bob/bobs_magic_handler.h repoA :: / tools / trunk / tool_A / extra / Libraries / bob / bobs_magic_handler.h
should always be pulled from 应该总是从
repoB::/libraries/trunk/bob/bobs_magic_handler_another_one.h repoB :: / libraries / trunk / bob / bobs_magic_handler_another_one.h
That way a developer that wants to work on repoA, just gets the entire project from A, and get notification if you can't access repoB. 这样,想要处理repoA的开发人员就可以从A获得整个项目,并在无法访问repoB时得到通知。 Even better would be if you can't update those files when getting them from repoA.
如果从repoA获取文件时无法更新这些文件,那就更好了。
Seems like this would be an age old problem. 似乎这将是一个古老的问题。 ie how to work on projects pulling files from multiple repos.
即如何处理从多个存储库中提取文件的项目。
I can't find my earlier answer on the same case, try to repeat it here 在相同的情况下,我找不到较早的答案,请尝试在此处重复
Explanation for your sample file 示例文件说明
repoA::/tools/trunk/tool_A/extra/Libraries/bob/bobs_magic_handler.h
and it's origin 它的起源
repoB::/libraries/trunk/bob/bobs_magic_handler_another_one.h
Because bobs_magic_handler.h
if file from another repository, you must to link to it's parent dir in RepoB from repoA. 因为
bobs_magic_handler.h
如果是另一个存储库中的文件,则必须从repoA链接到RepoB中它的父目录。 Ie get, fe "repoA::/Shared/bobtrunk/", which will have all from "repoB::/libraries/trunk/bob/" and "repoA::/Shared/bobtrunk/bobs_magic_handler_another_one.h" as part of this all 例如,获取“ repoA :: // Shared / bobtrunk /”,其中的全部内容都来自“ repoB :: // libraries / trunk / bob /”和“ repoA :: / Shared / bobtrunk / bobs_magic_handler_another_one.h”所有
At the second step you have to replace file "repoA::/tools/trunk/tool_A/extra/Libraries/bob/bobs_magic_handler.h" by link to "repoA::/Shared/bobtrunk/bobs_magic_handler_another_one.h" keeping the original name of file "bobs_magic_handler.h" (not "bobs_magic_handler_another_one.h") in target repository (maybe in two commits separately - delete real file, add externals - I can't recall details of process now) 在第二步中,您必须通过链接到“ repoA :: / Shared / bobtrunk / bobs_magic_handler_another_one.h”的链接来替换文件“ repoA :: / tools / trunk / tool_A / extra / Libraries / bob / bobs_magic_handler.h”目标存储库中的文件“ bobs_magic_handler.h”(而不是“ bobs_magic_handler_another_one.h”)(可能是在两次提交中分别删除-删除真实文件,添加外部文件-我现在不记得过程的详细信息)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.