I'd like to serve a CGI-based Mercurial repository from my OS X machine, but I cannot for the life of me find the hgweb.cgi file, which I assume is step 1 of the process.

My Mercurial installation comes from the OSX binary package installation, and lives in /usr/local. The python libraries are installed in /Library/Python/2.5/site-packages/mercurial:

(~): find /Library/Python/2.5/site-packages/mercurial -name hgweb*
/Library/Python/2.5/site-packages/mercurial/hgweb
/Library/Python/2.5/site-packages/mercurial/hgweb/hgweb_mod.py
/Library/Python/2.5/site-packages/mercurial/hgweb/hgweb_mod.pyc
/Library/Python/2.5/site-packages/mercurial/hgweb/hgweb_mod.pyo
/Library/Python/2.5/site-packages/mercurial/hgweb/hgwebdir_mod.py
/Library/Python/2.5/site-packages/mercurial/hgweb/hgwebdir_mod.pyc
/Library/Python/2.5/site-packages/mercurial/hgweb/hgwebdir_mod.pyo

What do I need to do do serve one or more repositories given this setup?

link|improve this question

58% accept rate
feedback

3 Answers

up vote 4 down vote accepted

http://mercurial.selenic.com/wiki/CGIinstall says under "Setup a cgi script to refer to your repository"

Copy the hgweb.cgi script from the mercurial sources to /var/www/cgi-hg/index.cgi

So it appears you need to download the source version to get that file.

link|improve this answer
feedback

Under Windows (and I'm assuming other OS's as well) you have to download the source in order to get hgweb.cgi.

It would be nice if there were an easy way to set up a shared server....

link|improve this answer
feedback

I know this thread is somewhat old but I figured I'd mention that I created a guide for setting up a Mercurial server in OS X 10.6. In this guide I also provide a link to the hgweb.cgi file that works in OS X for me.

http://www.popitandrockit.com/2010/05/mercurial-server-on-osx-106-snow.html

link|improve this answer
Thanks, that's a good bit of info to have. – Chris R Feb 20 '11 at 20:30
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.