mercurial/hgweb/hgweb_mod.py
branchstable
changeset 18515 bf8bbbf4aa45
parent 18429 e9ea0f0f05e7
child 18521 0af2fe7b3274
--- a/mercurial/hgweb/hgweb_mod.py	Wed Jan 30 16:08:32 2013 -0800
+++ b/mercurial/hgweb/hgweb_mod.py	Thu Jan 31 22:36:22 2013 +0100
@@ -24,7 +24,7 @@
     'pushkey': 'push',
 }
 
-def makebreadcrumb(url):
+def makebreadcrumb(url, prefix=''):
     '''Return a 'URL breadcrumb' list
 
     A 'URL breadcrumb' is a list of URL-name pairs,
@@ -33,6 +33,8 @@
     '''
     if url.endswith('/'):
         url = url[:-1]
+    if prefix:
+        url = '/' + prefix + url
     relpath = url
     if relpath.startswith('/'):
         relpath = relpath[1:]