hgweb.cgi
author Robin Farine <robin.farine@terminus.org>
Tue, 28 Feb 2006 23:47:40 -0800
changeset 1822 64df4220b349
parent 391 5f65a108a559
child 2506 d0db3462d568
permissions -rw-r--r--
copy/rename to a removed destination file When the destination of a copy or rename operation has been marked for removal, we need to restore it before we overwrite it with the new content. This also handles the case of idempotent renames, i.e. hg rename "a" "b" hg rename "b" "a"

#!/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()