I've managed to get mercurial up and running on my webhosting account. I'm able to push and pull via https to my repositories, but I have one requirement that's still giving me trouble: I need to make sure the working copies of some of my remote repositories are updated after every push.
I've added an hgrc file with the following contents under the .hg folder of a repository that I'd like to have updated after pushing:
[hooks]
changegroup = hg update >&2
When I push via https, this hook is not executed. I suspect it's a permissions problem and/or a problem of hgwebdir.cgi not knowing where the working copy is located. I've googled, but haven't found a solution yet. I'd really like to get this working over https if possible, to make it a little easier on my users.
My users are running TortoiseHG on Windows. If it's not possible (or not advisable due to security issues) to get this working over https, we'll push via ssh. The problem there is that I haven't been able to push via ssh so far, either. I've generated an ssh key pair. This pair works correctly when I log in to my Webhost via PuTTy, but it's not working when I try to push to mercurial via ssh. I've modified my ssh line in my mercurial.ini file to make it aware of my private key, but I only get timeouts when I try to run outgoing from TortoiseHG. Here's what the ssh line looks like in my mercurial.ini:
[ui]
ssh = "C:\Program Files\TortoiseHg\TortoisePlink.exe" -ssh -2 -i "C:\Users\me\path\to\key\mykey.ppk"
If the https url for my repository is https://hg.mydomain.com/hgwebdir.cgi/repo1 , can I deduce the correct ssh url from that? If so, what is it? Do I need to put my public key in some other place than authorized_keys for this to work?
If I can get this last piece of the puzzle fixed, I'll be in good shape. Any help is greatly appreciated.