Allow viewing of hg repo if direct navigation
This commit is contained in:
parent
2a020ba092
commit
0d798632de
@ -6,6 +6,7 @@
|
|||||||
# Path to repo or hgweb config to serve (see 'hg help hgweb')
|
# Path to repo or hgweb config to serve (see 'hg help hgweb')
|
||||||
# config = "/path/to/repo/or/config"
|
# config = "/path/to/repo/or/config"
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
config = "/home/www/indefero/scripts/hgweb.config"
|
config = "/home/www/indefero/scripts/hgweb.config"
|
||||||
|
|
||||||
# Uncomment and adjust if Mercurial is not installed system-wide
|
# Uncomment and adjust if Mercurial is not installed system-wide
|
||||||
@ -20,7 +21,7 @@ from mercurial.hgweb import hgwebdir, wsgicgi
|
|||||||
application = hgwebdir(config)
|
application = hgwebdir(config)
|
||||||
newrepos = []
|
newrepos = []
|
||||||
for repo in application.repos:
|
for repo in application.repos:
|
||||||
if not os.path.isfile(repo[1] + "/.hide"):
|
if not os.path.isfile(repo[1] + "/.hide") or repo[0] in os.environ["REQUEST_URI"]:
|
||||||
newrepos.append(repo)
|
newrepos.append(repo)
|
||||||
application.repos = newrepos
|
application.repos = newrepos
|
||||||
wsgicgi.launch(application)
|
wsgicgi.launch(application)
|
||||||
|
Loading…
Reference in New Issue
Block a user