This procedure significantly removes the complexity of the set up detailed in a previous post.
- Download and extract this archive.
- Replace the ~/python/mercurial folder with an alternate build if necessary (this one is for x86_64/python2.4).
- Upload to your web host.
* Note: The Mercurial CGI is designed to be run in a top-level domain or sub-domain. - Ensure the following settings:
~/cgi-bin/hgwebdir.cgi has permissions 755 (rwxr-xr-x)
~/cgi-bin/hgweb.config has file paths changed relative to your server
~/.htaccess has AuthFile paths changed relative to your server - Check to see if the site works.
To create a new repository, copy the example directory in the /cgi-bin folder to the same directory, fix it’s hgrc file in a text editor, and register this new project in hgweb.config. Configuration files:
- hgweb.config – repository directory config
- hgrc – per-project config
And that’s all. That was easy!
[…] Mercurial through this simple setup guide and ensure it is […]
By: Introducing Hg-PHP, a web Mercurial repository manager « Josh Carrier’s Blag on June 9, 2010
at 6:47 pm
It is awesome that you are enabling the use of hg repos on shared host. I was wondering; using the binaries you provided, would it be possible to run mercurial locally through ssh on my host? Basically, I cannot install mercurial (jailshell without gcc), but I’d still like to clone a repository to my shared host while logged in to ssh. Any ideas?
By: Ian on July 4, 2010
at 3:32 pm
The minimum your shared host will need is an installation of Python (I believe you can type “py –version” at the shell prompt in most cases to check). Then, if you SFTP the appropriate binaries to your shared host, Mercurial should be executable as “./hg”, “py hg” or something similar, which will then be invoked over SSH by a remote client. I haven’t tried this, but I remember skimming a bunch of support docs on the Mercurial home page regarding it (I’m on a very slow satellite connection right now, or I’d help you search). Let me know if you need any help with the binaries. I’m curious to see how this turns out!
By: joshjcarrier on July 10, 2010
at 10:38 am
Unfortunately that doesn’t work. Running “python hg.py” does nothing at all, even passing in args. Looking at the script in nano, I don’t see how hg.py actually processes args…
By: Ian on July 14, 2010
at 6:33 am
Worked for me! 🙂 Thanks!
By: Will on January 7, 2011
at 11:57 pm
I know it’s very old, but I’m getting
ImportError: python/mercurial/osutil.so: failed to map segment from shared object: Operation not permitted
What do I do?
By: Milind Ravindranath on October 4, 2013
at 7:59 am
Me apasiona la forma en que haas planteado el contenido.
Este web blog va rapidamente a preferidos! Cordialmente agradecido por lla asesoria!
By: trucos redstone minecraft on October 2, 2014
at 1:54 pm
No esta mal, aunque sin duda es mas conviente que postees
sobre el contenido con todavia mas documentacion. Un saludo
By: bungie destiny e3 trailer on October 9, 2014
at 12:20 pm
艾可力魔力净
By: 环保清洁用品 on February 18, 2016
at 12:44 am