Mercurial and library repos

Lars Kuhtz lars at exactcode.de
Thu Feb 7 02:52:20 CST 2008


Since it seems that many people request something like svn:externals but find 
the forest extension to complicated to use, maybe it would be nice to have a 
new extension that is on the one hand a lightweight  version of forest (much 
less powerfull but simpler to use) and on the other hand more general in that 
it is more independent of the type of the external sources. 

I suggest something quiet similar to svn:externals. A simple text-file 
describing the external dependencies (just as in svn:externals property). It 
should be possible to refer to sources other than hg-repositories as well, 
like other VCSs, ftp sources, or even download-locations with archives. Then 
the extension provides a single command that interprets the descriptions of 
the dependencies and clones/ downloads everthing and installs it to the right 
place and hides the external stuff via .hgignore (maybe it would be possible 
to extend the .hgignore mechanism to make "hg status" provide configurable 
labels on certain files -- there are other use-cases for this, too).

Then it is completely up to the user (and/ or the build-system) to know how to 
deal with the external sources. Maybe some kind of "status" command that is 
educated about the different types of sources would be convenient.

Some time ago I did something similar, not as an mercurial extension but by 
means of a very simple shell-script. It is really easy to do, but, I think, 
in many cases it is just enough.

--
Lars Kuhtz

On Wednesday 06 February 2008 21:57, Gregory Allen wrote:
> I have a "libraries" repo and several different project repos. Each
> project needs files from the libraries. Using Subversion's
> svn:externals, you can make your project repo refer to a certain
> version of an external repository.
>
> I can't be the first person to have this problem, and I've seen this
>
> questions asked before. Sometimes the answer is:
> > This is really not what hg was made for, so you should try a
> > different way of working.
> >
> :) What is the way I should be working?
>
> I've seen ForestExtension suggested, but the API is ... complex. A new
> set of commands depending on where you are in the tree is likely to
> cause confusion and error.
>
> I've also considered cloning the libraries repo to make a new project.
> Then I could use MQ to maintain patches to the libraries, that could
> get reapplied back up to the mainline libraries repo. Again, two sets
> of APIs that makes it complex for the user.
>
>
> What is the workflow to solve this problem that the Mercurial gurus
> would use?
>
> I'm trying to advocate Mercurial, but this is a sticking point.
>
> Thanks,
> -Greg
>
> Gregory E. Allen, MSEE Engineering Scientist
> Applied Research Laboratories: The University of Texas at Austin
> Please help find my missing daughter: http://FindSabrina.org/
>
>
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> http://selenic.com/mailman/listinfo/mercurial


More information about the Mercurial mailing list