We have several projects which we store in a single repository (let's call it repository A).
Some of the projects in repository A, use files which are source controlled in another repository (let's call it repository B).
The relationship is never the other way around (Rep B does not use files from 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.
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
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
The number of files in B is quite large (tens of thousands), and the number of files A uses from B is small (tens)
Ideally, I think there would be someway to store information in repo A, that
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
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. Even better would be if you can't update those files when getting them from repoA.
Seems like this would be an age old problem. i.e. 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.hand it's origin
repoB::/libraries/trunk/bob/bobs_magic_handler_another_one.hBecause
bobs_magic_handler.hif file from another repository, you must to link to it's parent dir in RepoB from repoA. I.e. get, f.e. "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 allAt 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)