Show More
@@ -24,7 +24,7 b' perms = {' | |||
|
24 | 24 | 'pushkey': 'push', |
|
25 | 25 | } |
|
26 | 26 | |
|
27 | def makebreadcrumb(url): | |
|
27 | def makebreadcrumb(url, prefix=''): | |
|
28 | 28 | '''Return a 'URL breadcrumb' list |
|
29 | 29 | |
|
30 | 30 | A 'URL breadcrumb' is a list of URL-name pairs, |
@@ -33,6 +33,8 b' def makebreadcrumb(url):' | |||
|
33 | 33 | ''' |
|
34 | 34 | if url.endswith('/'): |
|
35 | 35 | url = url[:-1] |
|
36 | if prefix: | |
|
37 | url = '/' + prefix + url | |
|
36 | 38 | relpath = url |
|
37 | 39 | if relpath.startswith('/'): |
|
38 | 40 | relpath = relpath[1:] |
@@ -133,6 +133,12 b' class hgwebdir(object):' | |||
|
133 | 133 | if self.stripecount: |
|
134 | 134 | self.stripecount = int(self.stripecount) |
|
135 | 135 | self._baseurl = self.ui.config('web', 'baseurl') |
|
136 | prefix = self.ui.config('web', 'prefix', '') | |
|
137 | if prefix.startswith('/'): | |
|
138 | prefix = prefix[1:] | |
|
139 | if prefix.endswith('/'): | |
|
140 | prefix = prefix[:-1] | |
|
141 | self.prefix = prefix | |
|
136 | 142 | self.lastrefresh = time.time() |
|
137 | 143 | |
|
138 | 144 | def run(self): |
@@ -395,7 +401,7 b' class hgwebdir(object):' | |||
|
395 | 401 | self.updatereqenv(req.env) |
|
396 | 402 | |
|
397 | 403 | return tmpl("index", entries=entries, subdir=subdir, |
|
398 | pathdef=makebreadcrumb('/' + subdir), | |
|
404 | pathdef=makebreadcrumb('/' + subdir, self.prefix), | |
|
399 | 405 | sortcolumn=sortcolumn, descending=descending, |
|
400 | 406 | **dict(sort)) |
|
401 | 407 |
General Comments 0
You need to be logged in to leave comments.
Login now