How to setup Mercurial central repository on shared hosting

Posted by Metropolis on Stack Overflow See other posts from Stack Overflow or by Metropolis
Published on 2010-03-20T18:10:00Z Indexed on 2010/03/20 19:31 UTC
Read the original article Hit count: 1125

Filed under:
|

Hey Everyone,

I am trying to setup a central repository with shared hosting. I read all the way through this tutorial http://mercurial.selenic.com/wiki/PublishingRepositories to no avail. Here are the steps I took.

1. Copy hgwebdir.cgi file to directory at http://url.com/central_repository/hgwebdir.cgi
2. Added the following information to the hgweb.config file and copied it to same place.
       [paths]
       projectname = /home/username/central_repository/projectname

       [web]
       baseurl = /hg
3. Added the following to an htaccess file and copied it to the same place
       # Taken from http://www.pmwiki.org/wiki/Cookbook/CleanUrls#samedir
       # Used at http://ggap.sf.net/hg/
       Options +ExecCGI
       RewriteEngine On
       #write base depending on where the base url lives
       RewriteBase /hg
       RewriteRule ^$ hgwebdir.cgi  [L]
       # Send requests for files that exist to those files.
       RewriteCond %{REQUEST_FILENAME} !-f
       # Send requests for directories that exist to those directories.
       RewriteCond %{REQUEST_FILENAME} !-d
       # Send requests to hgwebdir.cgi, appending the rest of url.
       RewriteRule (.*) hgwebdir.cgi/$1  [QSA,L]
4. Uploaded the repository without the working directory to /home/user/central_repository/projectname
5. Tried to clone the repository to my computer using the folloing destination path: http://url.com/hg/projectname

After going through these steps I get a 404: Not Found error.

However if I change the destination path to http://url.com/central_repository/projectname It acts like it found the repository, It tells me it found the changesets, and it was adding the changesets and manifests, but then it says "transaction abort! HTTP Error 500: Internal Server Error.

Thanks for any help! Metropolis

© Stack Overflow or respective owner

Related posts about mercurial

Related posts about sharedhosting