add a timeout when a lock is held (default 1024 sec)
- change the wait keyword from lock.lock to timeout,
a negative timeout of means "wait forever"
- refactor the two lock functions from localrepo.py
- make them use the timeout (default 1024, can be changed
with ui.timeout in the config file
- update the doc
#!/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()