hg static: easily upload your hg repo as website via FTP
Tom Anderson
tom.anderson at e2x.co.uk
Fri Oct 21 10:20:38 UTC 2011
On 20 October 2011 18:41, Arne Babenhauserheide <arne_bab at web.de> wrote:
> $ hg help static
> hg static [options] [folder]
>
> Create a static copy of the repository and/or upload it to an FTP server.
I just pulled the latest version (to /tmp/hgstatic). Then i created
and exported a small test site:
$ hg init furarne
$ cd furarne/
$ date >date
$ hg add
adding date
$ hg add
$ hg commit -m 'added date'
$ whoami >whoami
$ hg add
adding whoami
$ hg commit -m 'added whoami'
$ lsb_release >lsb_release
$ hg add
adding lsb_release
$ hg commit -m 'added lsb_release'
$ hg log
changeset: 2:9e863c971350
tag: tip
user: admin at e2x-dev-01
date: Fri Oct 21 11:05:43 2011 +0100
summary: added lsb_release
changeset: 1:70292607e021
user: admin at e2x-dev-01
date: Fri Oct 21 11:05:22 2011 +0100
summary: added whoami
changeset: 0:0f002e97ad08
user: admin at e2x-dev-01
date: Fri Oct 21 11:05:05 2011 +0100
summary: added date
$ echo -e "[extensions]\nstatic = /tmp/hgstatic/site.py" >.hg/hgrc
$ hg site /tmp/furarne.site
adding changesets
adding manifests
adding file changes
added 3 changesets with 3 changes to 3 files
The output is here:
http://urchin.earth.li/~twic/tmp/furarne.site/
Some observations:
* The changelog (and full changelog) omits revision 0
* The links to subdirectories are to the directory rather than the
index.html; this is fine on a web server, but fails if i look at the
export locally through a file:// URL, because Firefox shows a
directory listing
It's definitely cool, though - thanks! You can easily imagine lots
more features you could add (annotations, per-file history, lists of
tags), which i am sure you are already doing.
One suggestion: could you make the link from the /commit/*.html pages
to the /src/*/[index.html] pages more obvious? It took me a while
before i realised could see the source of the tree at each changeset.
tom
--
Tom Anderson | e2x Ltd, 1 Norton Folgate, London E1 6DB
(e) tom at e2x.co.uk | (m) +44 (7960) 989794 | (f) +44 (20) 7100 3749
More information about the Mercurial
mailing list