For those that have successfully deployed Mercurial to shared hosting, Hg-PHP Mercurial Repository Manager adds a web interface to manage the hosted repositories. For this first release (v1.0.20100516), features include:
- create new and delete existing repositories (modifies to hgweb.config)
- update individual repository settings, controlled available config options (modifies hgrc)
- integrated changeset, graph and file browser via original Mercurial web front-end
- overwrite protection (optimistic locking prevents accidental change cancellation when another user makes a change)
- theme mimicry (manager skinnable with the same stylesheet as available Mercurial web styles)
- basic authentication – filter repository-authenticated users by username
Installation is simple when performed in addition to my previous Mercurial shared server installation guide.
- Install Mercurial through this simple setup guide and ensure it is functional.
- Download the latest release of Hg-PHP.
- Extract and upload to the web server. If correct, the ‘admin’, ‘python’ and ‘cgi-bin’ folders should be in the same directory.
- Configure the application to finish the installation, modifying the files in /admin/application/config/:
- .htaccess: It might be appearing as hidden in the / directory, it needs your htpasswd file location. You’ll see an “Internal Server Error” if this isn’t configured right.
- config.php: base_url with the path to /admin on the web server
- hgphp.php: repositories_abs_dir with the absolute file path to your Hg repositories folder, hgrc_default_arr/paths/default with the URL of the Mercurial server. You may also add to hgrc_default_arr or set an alternate theme_layout. Relative directories are relative to /admin/index.php.
- mantis_auth.php: currently does not use Mantis Bug Tracker session authentication, but you’ll need to modify administrators to include the HTTP basic authenticated users that are permitted full access to the repository manager.
- Ensure /admin/lock and /cgi-bin are writable by the web server.
- Visit your repository manager by viewing the /admin path.
*Note: an error when accessing /admin like “Mercurial repository not found. The specified repository “500.shtml” is unknown, sorry” is most likely caused when /admin/index.php has write & execute privileges for someone other than the file owner. Change these permissions to fix this error.
Your feedback here and issues filed at BitBucket are much appreciated!
**Edit: This project is being renamed to phpHgAdmin… bigger update coming soon.