开发者

How can I 'hg clone' from another machine?

开发者 https://www.devze.com 2022-12-28 18:07 出处:网络
I have 2 Ubuntu laptops开发者_开发问答 in the same WiFi network. I would like to \'hg clone\' from 1 laptop to another.

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.


Like so:

hg clone ssh://your-user@192.168.1.2//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


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)

0

精彩评论

暂无评论...
验证码 换一张
取 消