4

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?

Chealion
  • 5,713
  • 27
  • 29
Chris R
  • 523
  • 1
  • 5
  • 20

3 Answers3

7

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.

Robert
  • 14,423
  • 4
  • 18
  • 14
2

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

kstrat2001
  • 21
  • 1
1

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

Brad Bruce
  • 616
  • 8
  • 17