view hgweb.cgi @ 2080:1cbb14c048cb

Reduce index memory usage by storing the bare string instead of tuples Storing the tuple returned by struct.unpack significantly increases the memory required to store the entire index in ram. This patch uses struct.unpack on demand instead.
author mason@suse.com
date Tue, 04 Apr 2006 19:00:40 -0400
parents 5f65a108a559
children
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()