hgweb.cgi
author Thomas Arendsen Hein <thomas@intevation.de>
Wed, 10 Aug 2005 06:47:46 +0100
changeset 862 d70c1c31fd45
parent 391 5f65a108a559
child 2506 d0db3462d568
permissions -rw-r--r--
Fix 3-way-merge of original parent, workdir and new parent. The dirstate has to match what is in the repository (what would be checked out with 'hg update -C'), because the resulting file may be identical to the new parent, or it may be completely different. Previously the dirstate wasn't updated, so if you changed the file to look like the original parent, it might be considered unmodified relative to the new parent.

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