tags:

views:

376

answers:

2

I'm using Mercurial for personal use and am conteplating it for some distributed projects as an alternative to SVN for various reasons.

I'm getting comfortable with using it for self contained projects and can see various options for sharing however I haven't yet found any guidance on managing common libraries to be included in multiple projects in a similar manner to that provided by externals in subversion.

The most obvious shared lump of code is error handling and reporting - we want this to be pretty much the same in all projects (its fairly well evolved). There is also utility code, control libraries and similar that we find better to have as projects built with each solution than to pull in as compiled classes (not least because it ensures they are kept up to date, continuous integration helps us address breaking changes).

Thoughts (I hate open ended questions, but I want to know what, if anything, others are doing).

A: 

Use the Forest Extension it emulates svn externals for HG, to some extent that is.

cartman
Thanks, will take a look (its not exactly what I read it as doing, but for that reason I haven't yet read enough...)
Murph
The Forrest Extension was never supported offically, and is now complely obviated by the sub-module support in Mercurial 1.3.
Ry4an
And thats a reason to downmod me? The time I wrote the answer there was no Mercurial 1.3. *sigh*
cartman
It's not downmodding you; it's downmodding the answer. It doesn't even reduce your reputation. Stackoverflow is supposed to produce living documents, where what was the best answer dips if it no longer is. That said, I've always found ForestExtension to be bad advice (though certainly well intended).
Ry4an
+2  A: 

Mercurial 1.3 now includes nested repository support, which can be used to express dependencies. The other option is to let your build system handle the download and tracking of dependencies using something like ivy or maven though those are more focused on pulling down compiled code.

Ry4an
Going to 1.3 works for me (or at least will do!)
Murph