Layered repositories

Radoslaw Szkodzinski astralstorm at
Thu Sep 22 08:27:41 CDT 2005

On Tue, 20 Sep 2005 02:05:48 +0200
Erich Schubert <erich at> wrote:

> Hi,
> > This method will work if the branches do not overwrite each other's
> > files. If that happens, the contents and existence of the files will
> > depend on the head last reverted to.
> Which is still not satisfying, since I need to have layers actually hide
> or replace files from lower layers, like the postfix configuration file,
> which is the same on all my machines except the mailservers.

It will hide them. The last revert will overwrite.

> Also doesn't revert undo my changes?
> Say I've modified some configuration option on the box. My usual process
> would be to update (if I forgot to update before my changes...), then
> commit my change.
> But with the update process you explained I would probably lose these
> changes?

Not really.
You just need to remember to update to the correct head.
This means the same head you are currently on.
Revert itself will scrap your changes, but you don't need to do it to update.

> Can I still commit files which are not in the head I checked out last?

Well, yes, using rawcommit with -p option I think. If you mean
committing them to another head. If not, then just a simple hg add, 
hg commit will do what you want.

But that's why I've told you that for development, you'd better have
multiple repository copies, each showing a different branch of the

hg status won't help you in this case. (it'll show you all files from
other branches as unknown) You must add the files manually and not use
hg addremove or hg commit -A.

GPG Key id:  0xD1F10BA2
Fingerprint: 96E2 304A B9C4 949A 10A0  9105 9543 0453 D1F1 0BA2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url :

More information about the Mercurial mailing list