Pull / clone over SSH

Matt Mackall mpm at selenic.com
Fri Jul 1 00:18:45 UTC 2005


On Fri, Jul 01, 2005 at 01:13:48AM +0100, Mark Williamson wrote:
> > SSH pull is not yet implemented. Doing it right means reworking the
> > protocol a bit. For the time being, you can do it similarly to what
> > push does internally:
> >
> > ssh user at remotehost -L <x>:localhost:<x> hg serve -p <x>
> > hg pull http://localhost:<x>/
> 
> Thanks for the tip, that works great!
> 
> Another question: BK had a concept of a "parent" repository in the
> hierarchy. This would default to the source of the original clone
> and would be used implicitly as the source argument to a pull / push
> unless you specified otherwise.
> 
> Is there any way to do this in hg? I know you can set aliases for
> repositories - and I don't want to turn hg into bk ;-) But I did
> always find it quite a handy feature - even if I could just set the
> default "parent repo" manually that'd save some typing in my
> workflow.

Yes. When you initially clone, your .hg/hgrc is initialized with the
clone source in a repository alias named "default". And if you do "hg
pull", it will pull from this "default" by default. Push defaults to
"default-push".

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial mailing list