Can I emulate svn:externals using mercurial?

SvnMercurialSvn ExternalsExternals

Svn Problem Overview


We are considering a move from SVN to Mercurial, and have encountered a stumbling block.

We currently use svn:externals to automatically pull a common set of libraries into the working directory. I can't find support for anything like this in Mercurial.

Is there a way to do this automatically with Mercurial, or do I need to fake it as part of my build process?

Svn Solutions


Solution 1 - Svn

It appears that the functionality of the Forest Extension is being implemented into core Mercurial (as of 1.3):

https://www.mercurial-scm.org/wiki/Subrepository.

Currently marked as "experimental" but perhaps will be the route to handle svn:external -type functionality as of v1.4.

Solution 2 - Svn

There's no good way to do it using mercurial only. The Forest Extension mentioned elsewhere causes more problems that in fixes nowadays. Most folks just use a large repo and include all their components in the repo and then have their build scripts download and use 3rd party libraries -- using maven if they're Java-heads.

Short answer "fake it in your build process".

Update:

In Mercurial 1.3 a new sub repos feature was added. it's like the old forest extension, but started as all new code.

Subrepos are considered a "feature of last resort".

Solution 3 - Svn

Have you tried Deps Extension ?

It's not part of Mercurial, but seems to mimic svn:externals feature

Solution 4 - Svn

Try Mercurial's Forest Extension.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionEltarielView Question on Stackoverflow
Solution 1 - SvnNick PierpointView Answer on Stackoverflow
Solution 2 - SvnRy4an BraseView Answer on Stackoverflow
Solution 3 - SvnyanjostView Answer on Stackoverflow
Solution 4 - SvnsanxiynView Answer on Stackoverflow