hg site

Create and/or upload a static copy of the repository.

You can get it via `hg clone http://draketo.de/proj/hgsite/`

The main goal is sharing code with Mercurial on servers who only offer
FTP access and statically served files, while providing the same
information as hg serve and full solutions like bitbucket and
gitorious (naturally without the interactivity).

On upload, only changed files are uploaded, based on the time they
were last modified, so uploads can be reasonably fast.


* Clone this repo.
  hg clone http://draketo.de/proj/hgsite/
* add this to the [extensions] section in your ~/.hgrc
  site = path/to/staticsite.py
  if you have no [extensions] section, add it.


$ hg push [-f] --sitename "sitename" ftp://user:password@ftp.host.tld/path/to/dir
→ that’s how this site gets created. 
  With -f it is reuploaded completely, 
  otherwise only the changes get uploaded.
  defining the ftp://… in [paths] in .hg/hgrc works.

To upload the site when you push it anywhere, you can use a hook in .hg/hgrc. This is what I use: 

    post-push = hg site -n site -u user:password@ftp.host.tld/path/to/dir

$ hg site --help
hg site [options] [folder]

Create a static copy of the repository and/or upload it to an FTP server.

use "hg help -e site" to show help for the site extension


 -n --name VALUE         the repo name. Default: folder or last segment of the
 -u --upload VALUE       upload the repo to the given ftp host. Format:
 -f --force              force recreating all commit files. Slow.
 -s --screenstyle VALUE  use a custom stylesheet for display on screen
 -p --printstyle VALUE   use a custom stylesheet for printing
    --mq                 operate on patch repository

use "hg -v help site" to show global options

Related: git2html → http://hssl.cs.jhu.edu/~neal/git2html/