hg site extension

hg site

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

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

Changes (full changelog)

(Arne Babenhauserheide)
2013-05-03: added tons of debug output trying to fix a bug which proved to be tip

added tons of debug output trying to fix a bug which proved to be caused by corruption of my local repo (likely disk-errors…).

(Arne Babenhauserheide)
2013-04-13: merge kav

merge kav

(drak)
2013-04-13: merge

merge

(drak)
2013-04-13: added bug: incoming commits have no diffstat

added bug: incoming commits have no diffstat

Branches

(Arne Babenhauserheide)
releases: Added signature for changeset 08246a90c806 2013-04-13

Added signature for changeset 08246a90c806

(Arne Babenhauserheide)
default: added tons of debug output trying to fix a bug which proved to be tip 2013-05-03

added tons of debug output trying to fix a bug which proved to be caused by corruption of my local repo (likely disk-errors…).

Tags

(Arne Babenhauserheide)
0.3: merge default into releases for release. releases 2013-04-13

merge default into releases for release.

(Arne Babenhauserheide)
0.2: merged default into stable for release. releases 2012-10-30

merged default into stable for release.

(Arne Babenhauserheide)
0.2.2: FIX: Crashed if there were no prettify.js and prettify.css in the 2012-11-20

FIX: Crashed if there were no prettify.js and prettify.css in the top level of the repo.

(Arne Babenhauserheide)
0.2.1: resolved obsolete bugs. 2012-11-01

resolved obsolete bugs.

(Arne Babenhauserheide)
0.1.1: show the first 5 lines of the README instead of 3 (so people can put releases 2011-11-24

show the first 5 lines of the README instead of 3 (so people can put a description and a clone URL into it.

(Arne Babenhauserheide)
0.1.2: merge default into release. releases 2011-11-24

merge default into release.

(Arne Babenhauserheide)
0.1.3: merge release releases 2011-11-24

merge release

(Arne Babenhauserheide)
0.1.4: works in 2.1, 2.3 and 2.4-rc 2012-10-28

works in 2.1, 2.3 and 2.4-rc

(Arne Babenhauserheide)
v0.1: new wish: settings in .hg/hgrc 2011-11-24

new wish: settings in .hg/hgrc

Bookmarks

(Arne Babenhauserheide)
testing-bookmark-display: branch+tag+bookmarks bug resolved 2011-11-24

branch+tag+bookmarks bug resolved

(Arne Babenhauserheide)
getincomingfromany: also show all outgoing changesets for all repo types except FTP. 2012-08-11

also show all outgoing changesets for all repo types except FTP.

Readme

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.

Install:

* 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.

Usage:

$ 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: 

    [hooks]
    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

options:

 -n --name VALUE         the repo name. Default: folder or last segment of the
                         repo-path.
 -u --upload VALUE       upload the repo to the given ftp host. Format:
                         user:password@host/path/to/dir
 -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/