two repositories sharing the same store?

Kelly O'Hair Kelly.Ohair at Sun.COM
Tue Jul 29 10:37:16 CDT 2008


Well, just for the email record, I think having two repositories share the
same .hg directory is a really really really BAD idea.

-kto

Sean Russell wrote:
> On Monday 28 July 2008 04:17:27 pm Alpár Jüttner wrote:
>>> 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).
> 
> I don't think you can *officially* have two workspaces automatically reflect 
> each other.  There will always be a pull/merge series of steps there if you 
> use pure Mercurial-isms.
> 
> What you want is two different workspaces to share the same .hg directory.  
> You could try *not* cloning, but symlinking the .hg directory (and any 
> related .hg* files):
> 
> 	# Working dir 1 is project1:
> 	cp -pvr project1 project2
> 	cd project2
> 	rm -rf .hg*
> 	ln -s ../project1/.hg .hg
> 
> That might get you to where you want to be.
> 
> --- SER
> 
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> http://selenic.com/mailman/listinfo/mercurial


More information about the Mercurial mailing list