Differences between revisions 2 and 3
Revision 2 as of 2012-08-11 23:19:26
Size: 2121
Editor: ArneBab
Comment:
Revision 3 as of 2012-10-30 23:00:09
Size: 2130
Editor: ArneBab
Comment: missing host part
Deletions are marked like this. Additions are marked like this.
Line 53: Line 53:
hg push ftp://username:password/path/to/repo --sitename <sitename> hg push ftp://username:password@host.tld/path/to/repo --sitename <sitename>

Site Extension

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.

Status

This extension is not distributed with Mercurial.

Author: ArneBab

Repository and site: http://draketo.de/proj/hgsite

Repository: https://bitbucket.org/ArneBab/site

Overview

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.

Configuration

  • 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

Usage

To create a basic static site, use

hg site [-n <sitename>] [<target-dir>]

To upload the repo, just use

hg push ftp://username:password@host.tld/path/to/repo --sitename <sitename>

For more information, see the integrated help

hg help site

See also


UsingExtensions CategoryExtension CategoryExtensionsByOthers

SiteExtension (last edited 2022-07-02 07:01:55 by ArneBab)