Using "raw" mercurial API I can write just something like:
peer = hg.peer(ui.ui(), {}, 'ssh://[email protected]/some/project')
After the connection is established, I can work with remote repo.
I'm failing to understand what should work with a remote repo using hglib. Naïve approach, i.e. using something just as simple as:
hglib.open("ssh://[email protected]/some/project")
does not work, and the exception raised does not make anything clearer to me.
My question: With hglib, how can I open connection to a remote ssh-repo?
The hglib documentation is not very wordy about how to use it. The best is to already have your key copied and RSA fingerprint in your
~/.ssh/known_hosts
.But you can clone a repo with:
You can of course add destination folder (e.g. dest="/path/to/blah").
If you already have an existing hg repo cloned you can change some settings in your hgrc before trying
hglib.open()
, so hg uses the ssh url like so:EDIT I think for hg.open to work, you have to have a repo checked out. For me I refer to the path where my repo is cloned. So:
To do this over SSH you have to edit your /repopath/.hg/hgrc as mentioned above.