On 3/28/2013 8:28 AM, Milan Sreckovic wrote:
> Anyone considering git submodules should definitely take a look at git 
> subtrees and see if that solution is more appropriate for the situation in 
> question.
>
> In our case, it may be that we want one approach for something like Moz2D, 
> and another one for something like skis, cairo, etc.
>

For those not aware of git subtrees, it's essentially the merging of a
foreign repository into a directory (subtree) of a larger repository.
There are no externals/submodules. The foreign repository is integrated
into a larger repository, history and all (unless you squash the
history). It essentially provides a simple-to-use way to replay commits
from a foreign repository onto your local repository. It even allows you
to extract your changes in the larger repository back into the
independent one!

And, Git subtree is essentially the strategy m-c uses today: one large
repository holding the history (albeit sometimes squashed landings) of
many external ones.

If we switched to Mercurial subrepos and wished for Git to flatten these
subrepos into 1 large one, this is a feature hg-git would need to grow.
It's doable, sure. However, going from squashed Git back to Mercurial
subrepos could be problematic to say the least. I'm not sure it could be
done reliably. This may kill our idea to have a *fully* writable Git
server someday (we may need to prevent writes to directories that are
Mercurial subrepos).

At the point you are squashing repos into 1 to convenience Git, you
might as well do the same to Mercurial to facilitate easier conversion.
That leaves us pretty much with where we are today.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to