Keeping third-party libraries under a Mercurial project: Sub-repos or not?

Posted by fraktal on Stack Overflow See other posts from Stack Overflow or by fraktal
Published on 2010-06-13T09:41:54Z Indexed on 2010/06/13 19:12 UTC
Read the original article Hit count: 179

Hello,

We are developing a closed-source project, versionned with Mercurial. We are using two libraries in our project :

  • One of those libraries is being developed by a third-party. They are using git, and we usually just pull from their repo once in a week to get the latest changes.

  • The other library is being developed by ourselves, and is under active development. It must live in its own public mercurial repository, as it is licensed under LGPL. (It's a fork of a third-party LGPL component, ported to our platform)

So my question is: How should I organize the source to ensure that:

  1. A developer from our team should be able to get all the source (main project + libraries) with a single "clone" command

  2. We should be able to pull easily the latest changes from the libraries, even though one of them is managed by git

Should we use mercurial sub-repos functionnality, with hg-git to access to the library under git? Is it well supported by TortoiseHg and BitBucket? (pros: easy to pull library changes / cons: does it works well?)

Or should we keep only snapshots of the libraries under our project? (thus, when there are new upstream changes in the libraries, we pull them to a separate place, and then copy the whole source to our project? (pros: will work / cons: pain in the ass, especially for the library that is being developed by ourselves, which is subject to a lot of daily changes)

© Stack Overflow or respective owner

Related posts about mercurial

Related posts about subrepos