view hgweb.cgi @ 25301:caaf4045eca8

match: normpath the ignore source when expanding the 'subinclude' kind Windows was previously getting this test failure: --- e:/Projects/hg/tests/test-hgignore.t +++ e:/Projects/hg/tests/test-hgignore.t.err @@ -230,6 +230,7 @@ $ hg status ? dir1/file2 + ? dir1/subdir/subfile3 ? dir1/subdir/subfile4 ? dir2/file1 @@ -241,4 +242,4 @@ $ echo "glob:file*2" > dir1/.hgignoretwo $ hg status | grep file2 - [1] + ? dir1/file2 The problem was 'source' would be in the form "F:\test-hgignore.t\.hgignore", so when pathutil.dirname() split on '/', 'sourceroot' was empty. Therefore, 'path' ended up being relative instead of absolute.
author Matt Harbison <matt_harbison@yahoo.com>
date Wed, 27 May 2015 13:28:16 -0400
parents 85cba926cb59
children 4b0fc75f9403
line wrap: on
line source

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