hgweb.cgi
author Patrick Mezard <pmezard@gmail.com>
Fri, 02 Dec 2011 17:38:07 +0100
changeset 15605 2ad5b8937d0d
parent 15475 85cba926cb59
child 26421 4b0fc75f9403
permissions -rwxr-xr-x
convert/svn: update svn working copy only when necessary I have not tried to produce the bug but here is idea: f85c0034a062 stopped passing the modified files list to commit. This makes commit more fragile since we better not touch unrelated files by mistake. But putcommit() still applies file changes before exiting upon ignored revisions. So in theory, we could apply changes from a skipped branch then commit them as part of another revision. This patch makes the sink apply the changes after possibly skipping the revision. The real fix would be to use svn commit --targets option to pass the file names in an argument file. Unfortunately, it seems to be bugged in svn 1.7.1: http://svn.haxx.se/dev/archive-2011-11/0211.shtml

#!/usr/bin/env python
#
# An example hgweb CGI script, edit as necessary
# See also http://mercurial.selenic.com/wiki/PublishingRepositories

# Path to repo or hgweb config to serve (see 'hg help hgweb')
config = "/path/to/repo/or/config"

# Uncomment and adjust if Mercurial is not installed system-wide
# (consult "installed modules" path from 'hg debuginstall'):
#import sys; sys.path.insert(0, "/path/to/python/lib")

# Uncomment to send python tracebacks to the browser if an error occurs:
#import cgitb; cgitb.enable()

from mercurial import demandimport; demandimport.enable()
from mercurial.hgweb import hgweb, wsgicgi
application = hgweb(config)
wsgicgi.launch(application)