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.
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.
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
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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With