Mercurial and library repos

Jesse Glick jesse.glick at sun.com
Wed Feb 6 17:01:46 CST 2008


Gregory Allen wrote:
> I've seen ForestExtension suggested

I think this is what most people would use, as it keeps the repositories 
independent except for the explicit linkage in a snapshot file. Poorly 
documented however.

> I've also considered cloning the libraries repo to make a new project.

This is also possible...

> Then I could use MQ to maintain patches to the libraries

Or more simply, commit fixes & improvements to the libraries repo and 
then pull from that into the project repos when ready. Downsides: (1) it 
makes it a bit awkward to revert to an earlier version of the library 
(can use hg backout); (2) it is tricky to make changes to the library 
code in the context of an example client project because the changes 
have to be actually committed in the library repo.

Alternately, keep the repositories fully separate and refer to binary 
releases of the library by version numbers of your choice. This assumes 
some kind of repository of library releases. If you are using Java, this 
would be the Maven way.



More information about the Mercurial mailing list