Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I 'hg clone' from another machine?

Tags:

mercurial

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 image 544
michael Avatar asked May 03 '10 06:05

michael


People also ask

How do I clone a mercurial repo?

Clone a remote Mercurial repositoryFrom the main menu, select Hg | Get from Version Control. The Get from Version Control dialog opens. In the dialog that opens, select Mercurial from the Version control list and specify the URL of the remote repository you want to clone. Click Clone.


2 Answers

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

like image 186
Zack Avatar answered Oct 05 '22 09:10

Zack


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)

like image 41
Tiberiu Ana Avatar answered Oct 05 '22 09:10

Tiberiu Ana