Git および SVN リポジトリからの外部コード (自分で変更できる) を含むプロジェクトを Mercurial に保存したいと考えています。SVN では、ベンダー ブランチでこれを解決し、コードをコピーしますが、Mercurialでは、プロジェクトごとに異なるリポジトリを用意し、必要に応じてそれらの間でプルする方がよいことを理解しました。
プロジェクトのレイアウトは次のようになります。
- externalLibraryA [SVN リポジトリから取得] - ...私からいくつかの追加ファイルを添えて - externalLibraryB [SVN リポジトリから取得] - ...私からいくつかの追加ファイルを添えて - externalPluginForExternalLibraryB [Git リポジトリから取得]
In Subversion I would create vendor
dir and a trunk
dir, copy all external libraries first in vendor
, and then in the right place in trunk
. (I think) I can do this in Mercurial too, with subrepositories, but is this the best way to do this?
I tried setting up different repositories for the external libraries, but then it seems I can't pull the externalLibraryARepo
into the externalLibraryA
directory of my main repository? It goes in the main directory, which is not what I want. I can also create a Mercurial mirror repository and include it as a subrepo in my main repository, but then the changes in this subdirectory go to the mirror repository, while I want them to stay in the main repository.