view hgweb.cgi @ 1721:801756d0ca84

add pretxncommit hook. hook allows check of changeset after create, but before transaction is committed. hook failure rolls transaction back. makes place for local policies like commit message must contain bug id or reviewer signoff. change also adds parent changeset ids to commit hook environment, because is cheap and useful.
author Vadim Gelfer <vadim.gelfer@gmail.com>
date Tue, 14 Feb 2006 17:13:18 -0800
parents 5f65a108a559
children d0db3462d568
line wrap: on
line source

#!/usr/bin/env python
#
# An example CGI script to use hgweb, edit as necessary

import cgitb, os, sys
cgitb.enable()

# sys.path.insert(0, "/path/to/python/lib") # if not a system-wide install
from mercurial import hgweb

h = hgweb.hgweb("/path/to/repo", "repository name")
h.run()