two repositories sharing the same store?

Matt Mackall mpm at selenic.com
Mon Jul 28 18:35:44 CDT 2008


On Mon, 2008-07-28 at 18:33 -0500, David Baum wrote:
> 
> 
> On Mon, Jul 28, 2008 at 5:10 PM, John Mulligan
> <phlogistonjohn at asynchrono.us> wrote:
>         You easily can automate the synchronization with hooks. For
>         example:
> 
> Thanks for the tip on using hooks.  That looks like it will solve my
> biggest concern (keeping the repos in sync).
> 
> 
>         See the previous replies on how clones use hard links to save
>         space. So unless
>         your repo is enormous just cloning is probably good enough.
> 
> I looked at the relinking script, but I believe it will only be able
> to use hard links if both repositories have the same changes applied
> in the same order.  If push/pull was manual, then I felt it was
> unlikely the order would stay the same for any length of time, but
> with automatic pushes it might work out fine.

You can use a symlink to make two repos share the same store. Which will
all just work unless you truncate history on one side (hg
rollback/qpop/strip/etc.) so that the other side has a working directory
not pointing to a valid revision.

> 
-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial mailing list