I’d like to use mercurial on a Windows server. Since I want to pull and push via http, hg serve seems the easiest solution. It works fine, but I have restart it after each reboot, so I need it as a Windows service. Installing it manually with sc create ... didn’t work, it created a service that throws an error when I attempt to start it. I found some references to this problem
- https://bitbucket.org/tortoisehg/stable/issue/1245/configure-hg-serve-to-run-as-a-windows-service-from
- https://bitbucket.org/andrearicossa/hgservice
but they are poorly documented if at all. (Of course, I could install a web server and use hgweb, but it seems even more complicated.) Do you have any experience how to set up easily hg serve ... <many args> as a Windows service?
UPDATE:
Thanks for the different approaches. We stayed with hg serve, the windows-guy at our company managed to install it as a not-quite-proper service.
You should check out Jerremy Skinner his blogpost on this subject. He explains how you can host Mercurial repositories on IIS7 and use some nice url-routing.
I did it on my machine and it works like a charm. It takes some configuration, but it’s worth it.
1 error in his post I noticed was that he’s writing about a hgwebdir.cgi, but I couldn’t find that one. I did find a hgweb.cgi, so did the copy-pasting with this file.