mercurial/hgweb/hgwebdir_mod.py
branchstable
changeset 18515 bf8bbbf4aa45
parent 18258 bebb05a7e249
child 18645 76ff3a715cf2
--- a/mercurial/hgweb/hgwebdir_mod.py	Wed Jan 30 16:08:32 2013 -0800
+++ b/mercurial/hgweb/hgwebdir_mod.py	Thu Jan 31 22:36:22 2013 +0100
@@ -133,6 +133,12 @@
         if self.stripecount:
             self.stripecount = int(self.stripecount)
         self._baseurl = self.ui.config('web', 'baseurl')
+        prefix = self.ui.config('web', 'prefix', '')
+        if prefix.startswith('/'):
+            prefix = prefix[1:]
+        if prefix.endswith('/'):
+            prefix = prefix[:-1]
+        self.prefix = prefix
         self.lastrefresh = time.time()
 
     def run(self):
@@ -395,7 +401,7 @@
         self.updatereqenv(req.env)
 
         return tmpl("index", entries=entries, subdir=subdir,
-                    pathdef=makebreadcrumb('/' + subdir),
+                    pathdef=makebreadcrumb('/' + subdir, self.prefix),
                     sortcolumn=sortcolumn, descending=descending,
                     **dict(sort))