10 from mercurial.i18n import _ |
10 from mercurial.i18n import _ |
11 from mercurial import ui, hg, scmutil, util, templater |
11 from mercurial import ui, hg, scmutil, util, templater |
12 from mercurial import error, encoding |
12 from mercurial import error, encoding |
13 from common import ErrorResponse, get_mtime, staticfile, paritygen, \ |
13 from common import ErrorResponse, get_mtime, staticfile, paritygen, \ |
14 get_contact, HTTP_OK, HTTP_NOT_FOUND, HTTP_SERVER_ERROR |
14 get_contact, HTTP_OK, HTTP_NOT_FOUND, HTTP_SERVER_ERROR |
15 from hgweb_mod import hgweb |
15 from hgweb_mod import hgweb, makebreadcrumb |
16 from request import wsgirequest |
16 from request import wsgirequest |
17 import webutil |
17 import webutil |
18 |
18 |
19 def cleannames(items): |
19 def cleannames(items): |
20 return [(util.pconvert(name).strip('/'), path) for name, path in items] |
20 return [(util.pconvert(name).strip('/'), path) for name, path in items] |
393 |
393 |
394 self.refresh() |
394 self.refresh() |
395 self.updatereqenv(req.env) |
395 self.updatereqenv(req.env) |
396 |
396 |
397 return tmpl("index", entries=entries, subdir=subdir, |
397 return tmpl("index", entries=entries, subdir=subdir, |
|
398 pathdef=makebreadcrumb('/' + subdir), |
398 sortcolumn=sortcolumn, descending=descending, |
399 sortcolumn=sortcolumn, descending=descending, |
399 **dict(sort)) |
400 **dict(sort)) |
400 |
401 |
401 def templater(self, req): |
402 def templater(self, req): |
402 |
403 |