tags:

views:

56

answers:

2

Hi,

I have 2 Ubuntu laptops in the same WiFi network. I would like to 'hg clone' from 1 laptop to another.

In my source laptop, I have a 'hg' repository in ~/work/myserver

and my source laptop ip address inet addr:192.168.1.2.

So what should i do on my dest laptop so that I can clone my hg repository?

Thank you.

+1  A: 

Like so:

hg clone ssh://[email protected]//home/my-user/work/myserver/

Note: If you're running a firewall on 192.168.1.2, you'll need to open port 22 for SSH. I believe Ubuntu uses ufw by default.

Note 2: Replace your-user with the user you use to login when you're sitting at 192.168.1.2

Zack
The path is relative to the user's home directory by default, if you want to use an absolute url as in your example you need an extra / before the path.
cjg
Thanks for pointing that out, for some reason Git doesn't require that.
Zack
+1  A: 

My choice between two Linux computers would also be going through ssh, as suggested by Zack.

One alternative that also works on Windows machines is to use the integrated web server to expose your repository, then clone from there.

First you run hg serve that will by default get you a web server on port 8000, then you just hg clone http://machine1:8000, with the added benefit that you get a nice graphical view of your history. (more information here)

Tiberiu Ana