hgweb.cgi
author Matt Harbison <matt_harbison@yahoo.com>
Fri, 04 Sep 2020 15:21:02 -0400
branchstable
changeset 45412 aaeccdb6e654
parent 45398 d58a205d0672
child 45830 c102b704edb5
permissions -rwxr-xr-x
repoview: pin revisions for `local` and `other` when a merge is active I've hit this a couple of times, where pulling with a dirty `wdir` obsoletes `p1` and updating to the successor results in merge conflicts. The problem was resolving them failed immediately, complaining that the old checkout was filtered. The change in `test-rebase-obsolete.t` is because there's an outstanding merge conflict in a rebase operation. The summary prompt to merge seems incorrect for this scenario, but that's an existing issue. Differential Revision: https://phab.mercurial-scm.org/D8980

#!/usr/bin/env python
#
# An example hgweb CGI script, edit as necessary
# See also https://mercurial-scm.org/wiki/PublishingRepositories

# Path to repo or hgweb config to serve (see 'hg help hgweb')
config = b"/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)