##// END OF EJS Templates
hgweb: rewrite path generation for index entries...
Gregory Szorc -
r36918:e473a032 default
parent child Browse files
Show More
@@ -9,7 +9,6 b''
9 from __future__ import absolute_import
9 from __future__ import absolute_import
10
10
11 import os
11 import os
12 import re
13 import time
12 import time
14
13
15 from ..i18n import _
14 from ..i18n import _
@@ -161,11 +160,12 b' def rawindexentries(ui, repos, wsgireq, '
161 except (IOError, error.RepoError):
160 except (IOError, error.RepoError):
162 pass
161 pass
163
162
164 parts = [name]
163 parts = [
165 parts.insert(0, '/' + subdir.rstrip('/'))
164 wsgireq.req.apppath.strip('/'),
166 if wsgireq.env['SCRIPT_NAME']:
165 subdir.strip('/'),
167 parts.insert(0, wsgireq.env['SCRIPT_NAME'])
166 name.strip('/'),
168 url = re.sub(r'/+', '/', '/'.join(parts) + '/')
167 ]
168 url = '/' + '/'.join(p for p in parts if p) + '/'
169
169
170 # show either a directory entry or a repository
170 # show either a directory entry or a repository
171 if directory:
171 if directory:
General Comments 0
You need to be logged in to leave comments. Login now