Show More
@@ -85,9 +85,10 b' class hgwebdir(object):' | |||
|
85 | 85 | |
|
86 | 86 | def archivelist(ui, nodeid, url): |
|
87 | 87 | allowed = ui.configlist("web", "allow_archive") |
|
88 | for i in ['zip', 'gz', 'bz2']: | |
|
89 | if i in allowed or ui.configbool("web", "allow" + i): | |
|
90 |
yield {"type" : i, " |
|
|
88 | for i in [('zip', '.zip'), ('gz', '.tar.gz'), ('bz2', '.tar.bz2')]: | |
|
89 | if i[0] in allowed or ui.configbool("web", "allow" + i[0]): | |
|
90 | yield {"type" : i[0], "extension": i[1], | |
|
91 | "node": nodeid, "url": url} | |
|
91 | 92 | |
|
92 | 93 | def entries(sortcolumn="", descending=False, **map): |
|
93 | 94 | rows = [] |
@@ -101,7 +102,7 b' class hgwebdir(object):' | |||
|
101 | 102 | get = u.config |
|
102 | 103 | |
|
103 | 104 | url = ('/'.join([req.env["REQUEST_URI"].split('?')[0], name]) |
|
104 | .replace("//", "/")) | |
|
105 | .replace("//", "/")) + '/' | |
|
105 | 106 | |
|
106 | 107 | # update time with local timezone |
|
107 | 108 | try: |
@@ -143,8 +144,16 b' class hgwebdir(object):' | |||
|
143 | 144 | |
|
144 | 145 | virtual = req.env.get("PATH_INFO", "").strip('/') |
|
145 | 146 | if virtual: |
|
147 | while virtual: | |
|
146 | 148 | real = dict(self.repos).get(virtual) |
|
147 | 149 | if real: |
|
150 | break | |
|
151 | up = virtual.rfind('/') | |
|
152 | if up < 0: | |
|
153 | break | |
|
154 | virtual = virtual[:up] | |
|
155 | if real: | |
|
156 | req.env['REPO_NAME'] = virtual | |
|
148 | 157 | try: |
|
149 | 158 | hgweb(real).run_wsgi(req) |
|
150 | 159 | except IOError, inst: |
General Comments 0
You need to be logged in to leave comments.
Login now