Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

3 Answers

up vote 6 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.

share|improve this answer
add comment

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....

share|improve this answer
add comment

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

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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