The Site extension offers an easy way to create static sites with information about a repository and to upload them to an FTP server.
Static sites with the site extension only require a simple HTTP server with FTP access and they can be cloned like any other (dumb) http repository.
This extension is not distributed with Mercurial.
Repository and site: http://draketo.de/proj/hgsite
The goal of the site extension is to minimize the requirements for sharing a Mercurial repository. All you need is a webserver which can serve static content over HTTP and to which you can upload files via FTP.
On top of this basic setup it replicates as many capabilities of more complex setups like bitbucket. Currently that includes:
- An overview page with the most recent commits, the branches, the bookmarks and (if available) the content of the readme file.
- Information about commits (diffs and files) with minimized changes: It only uploads changed files while still offering a way to access all files by linking back to the revision where the file was last changed.
Incoming and outgoing changes for forks. These are taken from the paths setup in the .hg/hgrc. It even works for decentrally and anonymously published Infocalypse repositories, so it can bind the different hosting sites together.
- To install the site extension, just clone one of its repositories.
- Configure your .hgrc to enable the extension by adding following lines:
[extensions] site = /full/path/to/hgsite/staticsite.py
To create a basic static site, use
hg site [-n <sitename>] [<target-dir>]
To upload the repo, just use
hg push ftp://username:firstname.lastname@example.org/path/to/repo --sitename <sitename>
For more information, see the integrated help
hg help site