two repositories sharing the same store?

Alpár Jüttner alpar at cs.elte.hu
Mon Jul 28 15:17:27 CDT 2008


On Mon, 2008-07-28 at 21:48 +0200, Martin Geisler wrote:
> Martin Geisler <mg at daimi.au.dk> writes:
> 
> > "David Baum" <dbaum at google.com> writes:
> >
> >> What's the best way to create a second work area for a project I'm
> >> working on? I know I can clone the original repository, but the
> >> drawback to this is that I have to make sure I push/pull between my
> >> two repositories to keep them in sync. It also takes up a lot more
> >> space since I'm keeping 2 copies around of essentially the same
> >> data.
> >
> > The data is hardlinked when you clone, so all the .hg directories
> > together will only take up the space for one copy. So Mercurial has
> > built-in support for your proposal :-)
> 
> As you add changesets to the clones and push/pull them back and forth,
> the .hg repositories will begin to contain duplicates which are not
> hardlinked.
> 

Well, it is not my question, but the first (and probably more important)
part of the question is about how to synchronize the repos automatically
(without explicitly pushing the changesets).

Regards,
Alpar

> This wiki page has a script which can recreate the links:
> 
> http://www.selenic.com/mercurial/wiki/index.cgi/RecreateHardlinksBetweenRepositories
> 



More information about the Mercurial mailing list