Last active
September 10, 2021 16:14
-
-
Save kamawanu/1bffae3b1283d0e31cf2a638c323bbce to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[subrepos] | |
git:allowed=true | |
[web] | |
push_ssl=False | |
allow_push=* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# | |
# An example hgweb CGI script, edit as necessary | |
# See also http://mercurial.selenic.com/wiki/PublishingRepositories | |
from mercurial import demandimport | |
import cgitb | |
from mercurial.hgweb import hgweb, wsgicgi | |
import os.path | |
import glob | |
import os | |
import sys | |
os.environ["HGENCODING"] = "UTF-8" | |
syms = [ | |
xx for xx in glob.glob("*") | |
if os.path.islink(xx) and os.path.isdir(xx) | |
] | |
##print(syms) | |
dirs = [] | |
for ROOT in syms: | |
dir0 = [ | |
( ( ROOT + "@" + os.path.basename(xx)).encode(), xx.encode()) | |
for xx in glob.glob(ROOT + "/*") | |
if os.path.isdir(xx + "/.hg") | |
] | |
dirs += dir0 | |
config = dirs | |
demandimport.enable() | |
app = hgweb(config) | |
#print(dir(app)) | |
app.run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# | |
# An example hgweb CGI script, edit as necessary | |
# See also http://mercurial.selenic.com/wiki/PublishingRepositories | |
from mercurial import demandimport | |
import cgitb | |
from mercurial.hgweb import hgweb, wsgicgi | |
from mercurial.hgweb.hgwebdir_mod import hgwebdir | |
import os.path | |
import glob | |
import os | |
import sys | |
os.environ["HGENCODING"] = "UTF-8" | |
config = "hgweb.config" | |
demandimport.enable() | |
app = hgwebdir(config.encode()) | |
#print(dir(app)) | |
app.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment