2013년 12월 3일 화요일

Mercurial - remote: abort: There is no Mercurial repository here (.hg not found)!

The following article describes how I resolved the Mercurial error message in the title.
The solution described here works fine, but the reasonings given in this article are totally wrong.
So, I rewrote the article.
If you are interested, please read this article, rather than the one below.
Thank you.

Hi, all!
I'm new to Mercurial and had some trouble cloning my own repository via ssh.
The error messages are as the following:

remote: abort: There is no Mercurial repository here (.hg not found)!
abort: no suitable response from remote hg!

I googled and found out some articles discussing about the same problem, but I had no proper answer.
The articles I found are (These are also the two top search results when I googled):

After some try-and-errors, I found a common simple mistake the articles are making.
It is:

Don't include '/home/user' in the source path.

For example, in the first article above:

hg clone -v ssh://carl@hostname//home/carl/Java/Projects/peta/
should be:
hg clone -v ssh://carl@hostname/Java/Projects/peta/

It's really simple, right?
In my case, I think, this mistake came from my old habit using Subversion via ssh, where I included '/home/user' part in the source path.

c.f. The source path representation in scp (remote file copy via ssh) is different from the two (Mercurial and Subversion).
It looks like this (using the example above):

scp carl@hostname:Java/Projects/peta/file path/to/destination ./

I hope this article can help many newbies in Mercurial.
Thanks for reading!

댓글 없음:

댓글 쓰기