Layered repositories

Erich Schubert erich at
Fri Sep 16 13:40:28 CDT 2005

Up to now I've been using subversion for my experiments, now I wonder if
maybe mercurial would be an interesting base to build upon... Right now
I have avoided looking at all the new SCMs out there - there are just
way to many of them - and especially the 'distributed' approach has
nothing to offer for me, I think.

Here's a mail I sent to the subversion dev list (and within links to
some blog post where I describe the same thing), please tell me how well
you think mercurial is suited for this "use case", and how much work it
will be to add this "layer" support to mercurial...

Disclaimer: If you have any personal feelings agains subversion, please
substitute "subversion" by "mercurial" in the quoted text yourself.
Except that my implementation doesn't support mercurial right now,
sorry. It's just that subversion was what I was already using, which was
ready to use for me, and had an obvious API I could use, so it was
obvious to experiment with it. I don't want to start any SCM bashing or
so, I'd just like some hints why mercurial might be better suited for my
use case.

> Hi,
> I've been working on a small python script to create a feature
> subversion is currently missing for me: layers.
> I want to store the configuration of some server in subversion. There
> are files I want to keep in sync on all servers (e.g. /etc/resolv.conf),
> and there are files which will never be the same on any two severs
> (e.g. /etc/hosts) - and anything inbetween. Merging would probably
> become a constant pain here, I guess...
> So I wrote a simple layer-based approach. They are simply stacked on top
> of each other; the file from the upmost layer is the one I work with.
> When I change a file, it should be commited to the first layer the file
> exists in.
> New files can either be placed in a configurable default layer, or
> require manual user specification (right now commit is not implemented
> anyway; you can only sync, then cd to your real checkouts and commit
> there)
> One special rule: if a file is ignored in a certain layer, all layers
> below are "hidden". So I can remove files by ignoring them in a higher
> layer.
> You can find more on this topic as well as on my problems in my blog, at
> My "prototype" is implemented in python, with pysvn. You can download it
> from

best regards,
Erich Schubert
    erich@(|    --    GPG Key ID: 4B3A135C    (o_
     Go away or i'll replace you with a very small shell script.     //\
   Die kürzeste Verbindung zwischen zwei Menschen ist ein Lächeln.   V_/_

More information about the Mercurial mailing list