Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can not clone mercurial (hg) repository via http

I can't clone my repository via http:

abort: 'http://MYREPO' does not appear to be an hg repository!

Firstly, I created a new repo by hg init MYREPO followed by adding some file and commit.

The dir with my repo is password protected but there is no sign of problem because of it, I tried both methods of cloning: (on my local machine)

hg clone http://MYREPO my_repo

and

hg clone http://user:password@MYREPO my_repo

Permissions of repo dir are: drwxrwxr-x

I can clone this very repository on my remote machine (the same repo is on) without any problems.

What could be possibly wrong?

like image 256
Piotr Byzia Avatar asked May 02 '09 14:05

Piotr Byzia


People also ask

How do I clone a Mercurial repository?

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.

What does HG update do?

Update sets the working directory's parent revision to the specified changeset (see hg help parents). If the changeset is not a descendant or ancestor of the working directory's parent and there are uncommitted changes, the update is aborted.


1 Answers

UPDATE:

Looks like you're getting confusing between repository and hostname

If running "hg serve", "hg clone http://USER@HOST:8000" where host can be you machine's IP or the hostname (type "hostname" on linux or try "ping localhost"). You can change the default port from 8000 by passing a --port #### to hg serve.

If you want to do it over ssh, "hg clone ssh://USER@HOST//PATH/TO/YOUR/REPOSITORY". Suppose you made an repository in your home directory called MYREPO then you would do this: "hg clone ssh://USER@HOST/~/MYREPO"

You can only clone your repo via http is something is serving that repo over http. Mercurial provides a built in http server for you. Run "hg serve" while inside of your repo then attempt to clone it from another location (or another command shell). If you just want a local clone, you don't need to use http ("hg clone ").

Also, try "hg help clone" and "hg help serve" for details.

like image 81
basszero Avatar answered Sep 23 '22 13:09

basszero