hgweb: add a "URL breadcrumb" to the index and repository pages
authorAngel Ezquerra <angel.ezquerra at gmail.com>
Wed, 28 Nov 2012 20:21:26 +0100
changeset 18258 bebb05a7e249
parent 18257 a35d0128545e
child 18259 7bf412b767fe
hgweb: add a "URL breadcrumb" to the index and repository pages The purpose of this change is to make it much easier to navigate up the repository tree when the hg web server is used to serve more than one repository. A "URL breadcrumb" is a path where each of the path items can be clicked to go to the corresponding path page. This lets you go up the folder hierarchy very quickly. For example, when showing the list of repositories in http://myserver/myteams/myprojects, the following "breadcrumb" will be shown: Mercurial > myteams > myprojects Clicking on "myprojects" reloads the page. Clicking on "myteams" goes up one folder. Clicking on the leftmost "Mercurial" goes to the server root. This "breadcrumb" also appears on all repository pages. For example on the summary page of the repository at http://myserver/myteams/myprojects/myrepo the following will be shown: Mercurial > myteams > myprojects > myrepo / summary This change has been applied to all templates that already had a link to the main repository page (i.e. gitweb, monoblue, paper and coal) plus to the index page of the spartan template. In order to make the breadcumb links stand out the some of the template styles have been customized.
mercurial/hgweb/hgweb_mod.py
mercurial/hgweb/hgwebdir_mod.py
mercurial/templates/coal/map
mercurial/templates/gitweb/bookmarks.tmpl
mercurial/templates/gitweb/branches.tmpl
mercurial/templates/gitweb/changelog.tmpl
mercurial/templates/gitweb/changeset.tmpl
mercurial/templates/gitweb/error.tmpl
mercurial/templates/gitweb/fileannotate.tmpl
mercurial/templates/gitweb/filecomparison.tmpl
mercurial/templates/gitweb/filediff.tmpl
mercurial/templates/gitweb/filelog.tmpl
mercurial/templates/gitweb/filerevision.tmpl
mercurial/templates/gitweb/graph.tmpl
mercurial/templates/gitweb/help.tmpl
mercurial/templates/gitweb/helptopics.tmpl
mercurial/templates/gitweb/index.tmpl
mercurial/templates/gitweb/manifest.tmpl
mercurial/templates/gitweb/map
mercurial/templates/gitweb/search.tmpl
mercurial/templates/gitweb/shortlog.tmpl
mercurial/templates/gitweb/summary.tmpl
mercurial/templates/gitweb/tags.tmpl
mercurial/templates/monoblue/bookmarks.tmpl
mercurial/templates/monoblue/branches.tmpl
mercurial/templates/monoblue/changelog.tmpl
mercurial/templates/monoblue/changeset.tmpl
mercurial/templates/monoblue/error.tmpl
mercurial/templates/monoblue/fileannotate.tmpl
mercurial/templates/monoblue/filecomparison.tmpl
mercurial/templates/monoblue/filediff.tmpl
mercurial/templates/monoblue/filelog.tmpl
mercurial/templates/monoblue/filerevision.tmpl
mercurial/templates/monoblue/graph.tmpl
mercurial/templates/monoblue/help.tmpl
mercurial/templates/monoblue/helptopics.tmpl
mercurial/templates/monoblue/index.tmpl
mercurial/templates/monoblue/manifest.tmpl
mercurial/templates/monoblue/map
mercurial/templates/monoblue/notfound.tmpl
mercurial/templates/monoblue/search.tmpl
mercurial/templates/monoblue/shortlog.tmpl
mercurial/templates/monoblue/summary.tmpl
mercurial/templates/monoblue/tags.tmpl
mercurial/templates/paper/bookmarks.tmpl
mercurial/templates/paper/branches.tmpl
mercurial/templates/paper/changeset.tmpl
mercurial/templates/paper/error.tmpl
mercurial/templates/paper/fileannotate.tmpl
mercurial/templates/paper/filecomparison.tmpl
mercurial/templates/paper/filediff.tmpl
mercurial/templates/paper/filelog.tmpl
mercurial/templates/paper/filerevision.tmpl
mercurial/templates/paper/graph.tmpl
mercurial/templates/paper/help.tmpl
mercurial/templates/paper/helptopics.tmpl
mercurial/templates/paper/index.tmpl
mercurial/templates/paper/manifest.tmpl
mercurial/templates/paper/map
mercurial/templates/paper/search.tmpl
mercurial/templates/paper/shortlog.tmpl
mercurial/templates/paper/tags.tmpl
mercurial/templates/spartan/index.tmpl
mercurial/templates/spartan/map
mercurial/templates/static/style-coal.css
mercurial/templates/static/style-monoblue.css
mercurial/templates/static/style-paper.css
--- a/mercurial/hgweb/hgweb_mod.py	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/hgweb/hgweb_mod.py	Wed Nov 28 20:21:26 2012 +0100
@@ -24,6 +24,30 @@
     'pushkey': 'push',
 }
 
+def makebreadcrumb(url):
+    '''Return a 'URL breadcrumb' list
+
+    A 'URL breadcrumb' is a list of URL-name pairs,
+    corresponding to each of the path items on a URL.
+    This can be used to create path navigation entries.
+    '''
+    if url.endswith('/'):
+        url = url[:-1]
+    relpath = url
+    if relpath.startswith('/'):
+        relpath = relpath[1:]
+
+    breadcrumb = []
+    urlel = url
+    pathitems = [''] + relpath.split('/')
+    for pathel in reversed(pathitems):
+        if not pathel or not urlel:
+            break
+        breadcrumb.append({'url': urlel, 'name': pathel})
+        urlel = os.path.dirname(urlel)
+    return reversed(breadcrumb)
+
+
 class hgweb(object):
     def __init__(self, repo, name=None, baseui=None):
         if isinstance(repo, str):
@@ -285,7 +309,8 @@
                                              "header": header,
                                              "footer": footer,
                                              "motd": motd,
-                                             "sessionvars": sessionvars
+                                             "sessionvars": sessionvars,
+                                             "pathdef": makebreadcrumb(req.url),
                                             })
         return tmpl
 
--- a/mercurial/hgweb/hgwebdir_mod.py	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/hgweb/hgwebdir_mod.py	Wed Nov 28 20:21:26 2012 +0100
@@ -12,7 +12,7 @@
 from mercurial import error, encoding
 from common import ErrorResponse, get_mtime, staticfile, paritygen, \
                    get_contact, HTTP_OK, HTTP_NOT_FOUND, HTTP_SERVER_ERROR
-from hgweb_mod import hgweb
+from hgweb_mod import hgweb, makebreadcrumb
 from request import wsgirequest
 import webutil
 
@@ -395,6 +395,7 @@
         self.updatereqenv(req.env)
 
         return tmpl("index", entries=entries, subdir=subdir,
+                    pathdef=makebreadcrumb('/' + subdir),
                     sortcolumn=sortcolumn, descending=descending,
                     **dict(sort))
 
--- a/mercurial/templates/coal/map	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/coal/map	Wed Nov 28 20:21:26 2012 +0100
@@ -223,3 +223,4 @@
 error = ../paper/error.tmpl
 urlparameter = '{separator}{name}={value|urlescape}'
 hiddenformentry = '<input type="hidden" name="{name}" value="{value|escape}" />'
+breadcrumb = '&gt; <a href="{url}">{name}</a> '
--- a/mercurial/templates/gitweb/bookmarks.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/gitweb/bookmarks.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -8,7 +8,8 @@
 <body>
 
 <div class="page_header">
-<a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / bookmarks
+<a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a>
+<a href="/">Mercurial</a> {pathdef%breadcrumb} / bookmarks
 </div>
 
 <div class="page_nav">
--- a/mercurial/templates/gitweb/branches.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/gitweb/branches.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -8,7 +8,8 @@
 <body>
 
 <div class="page_header">
-<a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / branches
+<a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a>
+<a href="/">Mercurial</a> {pathdef%breadcrumb} / branches
 </div>
 
 <div class="page_nav">
--- a/mercurial/templates/gitweb/changelog.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/gitweb/changelog.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -8,7 +8,8 @@
 <body>
 
 <div class="page_header">
-<a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / changelog
+<a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a>
+<a href="/">Mercurial</a> {pathdef%breadcrumb} / changelog
 </div>
 
 <form action="{url}log">
--- a/mercurial/templates/gitweb/changeset.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/gitweb/changeset.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -8,7 +8,8 @@
 <body>
 
 <div class="page_header">
-<a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / changeset
+<a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a>
+<a href="/">Mercurial</a> {pathdef%breadcrumb} / changeset
 </div>
 
 <div class="page_nav">
--- a/mercurial/templates/gitweb/error.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/gitweb/error.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -8,7 +8,8 @@
 <body>
 
 <div class="page_header">
-<a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / error
+<a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a>
+<a href="/">Mercurial</a> {pathdef%breadcrumb} / error
 </div>
 
 <div class="page_nav">
--- a/mercurial/templates/gitweb/fileannotate.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/gitweb/fileannotate.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -8,7 +8,8 @@
 <body>
 
 <div class="page_header">
-<a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / annotate
+<a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a>
+<a href="/">Mercurial</a> {pathdef%breadcrumb} / annotate
 </div>
 
 <div class="page_nav">
--- a/mercurial/templates/gitweb/filecomparison.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/gitweb/filecomparison.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -8,7 +8,8 @@
 <body>
 
 <div class="page_header">
-<a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / comparison
+<a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a>
+<a href="/">Mercurial</a> {pathdef%breadcrumb} / comparison
 </div>
 
 <div class="page_nav">
--- a/mercurial/templates/gitweb/filediff.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/gitweb/filediff.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -8,7 +8,8 @@
 <body>
 
 <div class="page_header">
-<a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / diff
+<a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a>
+<a href="/">Mercurial</a> {pathdef%breadcrumb} / diff
 </div>
 
 <div class="page_nav">
--- a/mercurial/templates/gitweb/filelog.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/gitweb/filelog.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -8,7 +8,8 @@
 <body>
 
 <div class="page_header">
-<a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / file revisions
+<a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a>
+<a href="/">Mercurial</a> {pathdef%breadcrumb} / file revisions
 </div>
 
 <div class="page_nav">
--- a/mercurial/templates/gitweb/filerevision.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/gitweb/filerevision.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -8,7 +8,8 @@
 <body>
 
 <div class="page_header">
-<a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / file revision
+<a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a>
+<a href="/">Mercurial</a> {pathdef%breadcrumb} / file revision
 </div>
 
 <div class="page_nav">
--- a/mercurial/templates/gitweb/graph.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/gitweb/graph.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -9,7 +9,8 @@
 <body>
 
 <div class="page_header">
-<a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / graph
+<a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a>
+<a href="/">Mercurial</a> {pathdef%breadcrumb} / graph
 </div>
 
 <form action="{url}log">
--- a/mercurial/templates/gitweb/help.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/gitweb/help.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -8,7 +8,8 @@
 <body>
 
 <div class="page_header">
-<a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / help
+<a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a>
+<a href="/">Mercurial</a> {pathdef%breadcrumb} / help
 </div>
 
 <div class="page_nav">
--- a/mercurial/templates/gitweb/helptopics.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/gitweb/helptopics.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -8,7 +8,8 @@
 <body>
 
 <div class="page_header">
-<a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / help
+<a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a>
+<a href="/">Mercurial</a> {pathdef%breadcrumb} / help
 </div>
 
 <div class="page_nav">
--- a/mercurial/templates/gitweb/index.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/gitweb/index.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -5,7 +5,7 @@
 
 <div class="page_header">
     <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a>
-    Repositories list
+    <a href="/">Mercurial</a> {pathdef%breadcrumb}
 </div>
 
 <table cellspacing="0">
--- a/mercurial/templates/gitweb/manifest.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/gitweb/manifest.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -8,7 +8,8 @@
 <body>
 
 <div class="page_header">
-<a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / files
+<a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a>
+<a href="/">Mercurial</a> {pathdef%breadcrumb} / files
 </div>
 
 <div class="page_nav">
--- a/mercurial/templates/gitweb/map	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/gitweb/map	Wed Nov 28 20:21:26 2012 +0100
@@ -305,3 +305,4 @@
 index = index.tmpl
 urlparameter = '{separator}{name}={value|urlescape}'
 hiddenformentry = '<input type="hidden" name="{name}" value="{value|escape}" />'
+breadcrumb = '&gt; <a href="{url}">{name}</a> '
--- a/mercurial/templates/gitweb/search.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/gitweb/search.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -8,7 +8,8 @@
 <body>
 
 <div class="page_header">
-<a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / search
+<a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a>
+<a href="/">Mercurial</a> {pathdef%breadcrumb} / search
 
 <form action="{url}log">
 {sessionvars%hiddenformentry}
--- a/mercurial/templates/gitweb/shortlog.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/gitweb/shortlog.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -8,7 +8,8 @@
 <body>
 
 <div class="page_header">
-<a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / shortlog
+<a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a>
+<a href="/">Mercurial</a> {pathdef%breadcrumb} / shortlog
 </div>
 
 <form action="{url}log">
--- a/mercurial/templates/gitweb/summary.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/gitweb/summary.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -8,8 +8,8 @@
 <body>
 
 <div class="page_header">
-<a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / summary
-
+<a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a>
+<a href="/">Mercurial</a> {pathdef%breadcrumb} / summary
 <form action="{url}log">
 {sessionvars%hiddenformentry}
 <div class="search">
--- a/mercurial/templates/gitweb/tags.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/gitweb/tags.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -8,7 +8,8 @@
 <body>
 
 <div class="page_header">
-<a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / tags
+<a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a>
+<a href="/">Mercurial</a> {pathdef%breadcrumb} / tags
 </div>
 
 <div class="page_nav">
--- a/mercurial/templates/monoblue/bookmarks.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/monoblue/bookmarks.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -7,7 +7,7 @@
 <body>
 <div id="container">
     <div class="page-header">
-        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / bookmarks</h1>
+        <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / bookmarks</h1>
 
         <form action="{url}log">
             {sessionvars%hiddenformentry}
--- a/mercurial/templates/monoblue/branches.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/monoblue/branches.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -7,7 +7,7 @@
 <body>
 <div id="container">
     <div class="page-header">
-        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / branches</h1>
+        <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / branches</h1>
 
         <form action="{url}log">
             {sessionvars%hiddenformentry}
--- a/mercurial/templates/monoblue/changelog.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/monoblue/changelog.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -7,7 +7,7 @@
 <body>
 <div id="container">
     <div class="page-header">
-        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / changelog</h1>
+        <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / changelog</h1>
 
         <form action="{url}log">
             {sessionvars%hiddenformentry}
--- a/mercurial/templates/monoblue/changeset.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/monoblue/changeset.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -7,7 +7,7 @@
 <body>
 <div id="container">
     <div class="page-header">
-        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / changeset</h1>
+        <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / changeset</h1>
 
         <form action="{url}log">
             {sessionvars%hiddenformentry}
--- a/mercurial/templates/monoblue/error.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/monoblue/error.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -7,7 +7,7 @@
 <body>
 <div id="container">
     <div class="page-header">
-        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / not found: {repo|escape}</h1>
+        <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / not found: {repo|escape}</h1>
 
         <form action="{url}log">
             {sessionvars%hiddenformentry}
--- a/mercurial/templates/monoblue/fileannotate.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/monoblue/fileannotate.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -7,7 +7,7 @@
 <body>
 <div id="container">
     <div class="page-header">
-        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / annotate</h1>
+        <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / annotate</h1>
 
         <form action="{url}log">
             {sessionvars%hiddenformentry}
--- a/mercurial/templates/monoblue/filecomparison.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/monoblue/filecomparison.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -7,7 +7,7 @@
 <body>
 <div id="container">
     <div class="page-header">
-        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / file comparison</h1>
+        <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / file comparison</h1>
 
         <form action="{url}log">
             {sessionvars%hiddenformentry}
--- a/mercurial/templates/monoblue/filediff.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/monoblue/filediff.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -7,7 +7,7 @@
 <body>
 <div id="container">
     <div class="page-header">
-        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / file diff</h1>
+        <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / file diff</h1>
 
         <form action="{url}log">
             {sessionvars%hiddenformentry}
--- a/mercurial/templates/monoblue/filelog.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/monoblue/filelog.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -7,7 +7,7 @@
 <body>
 <div id="container">
     <div class="page-header">
-        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / file revisions</h1>
+        <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / file revisions</h1>
 
         <form action="{url}log">
             {sessionvars%hiddenformentry}
--- a/mercurial/templates/monoblue/filerevision.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/monoblue/filerevision.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -7,7 +7,7 @@
 <body>
 <div id="container">
     <div class="page-header">
-        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / file revision</h1>
+        <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / file revision</h1>
 
         <form action="{url}log">
             {sessionvars%hiddenformentry}
--- a/mercurial/templates/monoblue/graph.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/monoblue/graph.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -8,7 +8,7 @@
 <body>
 <div id="container">
     <div class="page-header">
-        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / graph</h1>
+        <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / graph</h1>
 
         <form action="{url}log">
             {sessionvars%hiddenformentry}
--- a/mercurial/templates/monoblue/help.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/monoblue/help.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -7,7 +7,7 @@
 <body>
 <div id="container">
     <div class="page-header">
-        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / help</h1>
+        <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / help</h1>
 
         <form action="{url}log">
             {sessionvars%hiddenformentry}
--- a/mercurial/templates/monoblue/helptopics.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/monoblue/helptopics.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -7,7 +7,7 @@
 <body>
 <div id="container">
     <div class="page-header">
-        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / help</h1>
+        <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / help</h1>
 
         <form action="{url}log">
             {sessionvars%hiddenformentry}
--- a/mercurial/templates/monoblue/index.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/monoblue/index.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -5,7 +5,7 @@
 <body>
 <div id="container">
     <div class="page-header">
-        <h1>Mercurial Repositories</h1>
+        <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb}</h1>
         <ul class="page-nav">
         </ul>
     </div>
--- a/mercurial/templates/monoblue/manifest.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/monoblue/manifest.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -7,7 +7,7 @@
 <body>
 <div id="container">
     <div class="page-header">
-        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / files</h1>
+        <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / files</h1>
 
         <form action="{url}log">
             {sessionvars%hiddenformentry}
--- a/mercurial/templates/monoblue/map	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/monoblue/map	Wed Nov 28 20:21:26 2012 +0100
@@ -259,3 +259,4 @@
 urlparameter = '{separator}{name}={value|urlescape}'
 hiddenformentry = '<input type="hidden" name="{name}" value="{value|escape}" />'
 graph = graph.tmpl
+breadcrumb = '&gt; <a href="{url}">{name}</a> '
--- a/mercurial/templates/monoblue/notfound.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/monoblue/notfound.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -7,7 +7,7 @@
 <body>
 <div id="container">
     <div class="page-header">
-        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / not found: {repo|escape}</h1>
+        <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / not found: {repo|escape}</h1>
 
         <form action="{url}log">
             {sessionvars%hiddenformentry}
--- a/mercurial/templates/monoblue/search.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/monoblue/search.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -7,7 +7,7 @@
 <body>
 <div id="container">
     <div class="page-header">
-        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / search</h1>
+        <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / search</h1>
 
         <form action="{url}log">
             {sessionvars%hiddenformentry}
--- a/mercurial/templates/monoblue/shortlog.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/monoblue/shortlog.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -7,7 +7,7 @@
 <body>
 <div id="container">
     <div class="page-header">
-        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / shortlog</h1>
+        <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / shortlog</h1>
 
         <form action="{url}log">
             {sessionvars%hiddenformentry}
--- a/mercurial/templates/monoblue/summary.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/monoblue/summary.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -7,7 +7,7 @@
 <body>
 <div id="container">
     <div class="page-header">
-        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / summary</h1>
+        <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / summary</h1>
 
         <form action="{url}log">
             {sessionvars%hiddenformentry}
--- a/mercurial/templates/monoblue/tags.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/monoblue/tags.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -7,7 +7,7 @@
 <body>
 <div id="container">
     <div class="page-header">
-        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / tags</h1>
+        <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / tags</h1>
 
         <form action="{url}log">
             {sessionvars%hiddenformentry}
--- a/mercurial/templates/paper/bookmarks.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/paper/bookmarks.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -32,7 +32,7 @@
 </div>
 
 <div class="main">
-<h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
+<h2 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb}</h2>
 <h3>bookmarks</h3>
 
 <form class="search" action="{url}log">
--- a/mercurial/templates/paper/branches.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/paper/branches.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -32,7 +32,7 @@
 </div>
 
 <div class="main">
-<h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
+<h2 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb}</h2>
 <h3>branches</h3>
 
 <form class="search" action="{url}log">
--- a/mercurial/templates/paper/changeset.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/paper/changeset.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -30,7 +30,7 @@
 
 <div class="main">
 
-<h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
+<h2 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb}</h2>
 <h3>changeset {rev}:{node|short} {changesetbranch%changelogbranchname} {changesettag} {changesetbookmark}</h3>
 
 <form class="search" action="{url}log">
--- a/mercurial/templates/paper/error.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/paper/error.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -23,7 +23,7 @@
 
 <div class="main">
 
-<h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
+<h2 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb}</h2>
 <h3>error</h3>
 
 <form class="search" action="{url}log">
--- a/mercurial/templates/paper/fileannotate.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/paper/fileannotate.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -36,7 +36,7 @@
 </div>
 
 <div class="main">
-<h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
+<h2 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb}</h2>
 <h3>annotate {file|escape} @ {rev}:{node|short}</h3>
 
 <form class="search" action="{url}log">
--- a/mercurial/templates/paper/filecomparison.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/paper/filecomparison.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -35,7 +35,7 @@
 </div>
 
 <div class="main">
-<h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
+<h2 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb}</h2>
 <h3>comparison {file|escape} @ {rev}:{node|short}</h3>
 
 <form class="search" action="{url}log">
--- a/mercurial/templates/paper/filediff.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/paper/filediff.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -35,7 +35,7 @@
 </div>
 
 <div class="main">
-<h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
+<h2 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb}</h2>
 <h3>diff {file|escape} @ {rev}:{node|short}</h3>
 
 <form class="search" action="{url}log">
--- a/mercurial/templates/paper/filelog.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/paper/filelog.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -43,7 +43,7 @@
 </div>
 
 <div class="main">
-<h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
+<h2 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb}</h2>
 <h3>log {file|escape}</h3>
 
 <form class="search" action="{url}log">
--- a/mercurial/templates/paper/filerevision.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/paper/filerevision.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -34,7 +34,7 @@
 </div>
 
 <div class="main">
-<h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
+<h2 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb}</h2>
 <h3>view {file|escape} @ {rev}:{node|short}</h3>
 
 <form class="search" action="{url}log">
--- a/mercurial/templates/paper/graph.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/paper/graph.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -37,7 +37,7 @@
 </div>
 
 <div class="main">
-<h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
+<h2 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb}</h2>
 <h3>graph</h3>
 
 <form class="search" action="{url}log">
--- a/mercurial/templates/paper/help.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/paper/help.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -22,7 +22,7 @@
 </div>
 
 <div class="main">
-<h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
+<h2 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb}</h2>
 <h3>Help: {topic}</h3>
 
 <form class="search" action="{url}log">
--- a/mercurial/templates/paper/helptopics.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/paper/helptopics.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -22,7 +22,7 @@
 </div>
 
 <div class="main">
-<h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
+<h2 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb}</h2>
 <form class="search" action="{url}log">
 {sessionvars%hiddenformentry}
 <p><input name="rev" id="search1" type="text" size="30" /></p>
--- a/mercurial/templates/paper/index.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/paper/index.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -9,7 +9,7 @@
 <img src="{staticurl}{logoimg}" width=75 height=90 border=0 alt="mercurial" /></a>
 </div>
 <div class="main">
-<h2>Mercurial Repositories</h2>
+<h2 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb}</h2>
 
 <table class="bigtable">
     <tr>
--- a/mercurial/templates/paper/manifest.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/paper/manifest.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -29,7 +29,7 @@
 </div>
 
 <div class="main">
-<h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
+<h2 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb}</h2>
 <h3>directory {path|escape} @ {rev}:{node|short} {tags%changelogtag}</h3>
 
 <form class="search" action="{url}log">
--- a/mercurial/templates/paper/map	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/paper/map	Wed Nov 28 20:21:26 2012 +0100
@@ -231,3 +231,4 @@
 error = error.tmpl
 urlparameter = '{separator}{name}={value|urlescape}'
 hiddenformentry = '<input type="hidden" name="{name}" value="{value|escape}" />'
+breadcrumb = '&gt; <a href="{url}">{name}</a> '
--- a/mercurial/templates/paper/search.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/paper/search.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -20,7 +20,7 @@
 </div>
 
 <div class="main">
-<h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
+<h2 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb}</h2>
 <h3>searching for '{query|escape}'</h3>
 
 <form class="search" action="{url}log">
--- a/mercurial/templates/paper/shortlog.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/paper/shortlog.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -39,7 +39,7 @@
 </div>
 
 <div class="main">
-<h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
+<h2 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb}</h2>
 <h3>log</h3>
 
 <form class="search" action="{url}log">
--- a/mercurial/templates/paper/tags.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/paper/tags.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -31,7 +31,7 @@
 </div>
 
 <div class="main">
-<h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
+<h2 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb}</h2>
 <h3>tags</h3>
 
 <form class="search" action="{url}log">
--- a/mercurial/templates/spartan/index.tmpl	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/spartan/index.tmpl	Wed Nov 28 20:21:26 2012 +0100
@@ -3,7 +3,7 @@
 </head>
 <body>
 
-<h2>Mercurial Repositories</h2>
+<h2><a href="/">Mercurial</a> {pathdef%breadcrumb}</h2>
 
 <table>
     <tr>
--- a/mercurial/templates/spartan/map	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/spartan/map	Wed Nov 28 20:21:26 2012 +0100
@@ -181,3 +181,4 @@
 error = error.tmpl
 urlparameter = '{separator}{name}={value|urlescape}'
 hiddenformentry = '<input type="hidden" name="{name}" value="{value|escape}" />'
+breadcrumb = '&gt; <a href="{url}">{name}</a> '
--- a/mercurial/templates/static/style-coal.css	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/static/style-coal.css	Wed Nov 28 20:21:26 2012 +0100
@@ -323,3 +323,11 @@
 .block {
     border-top: 1px solid #999;
 }
+
+.breadcrumb {
+    color: gray;
+}
+
+.breadcrumb a {
+    color: blue;
+}
--- a/mercurial/templates/static/style-monoblue.css	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/static/style-monoblue.css	Wed Nov 28 20:21:26 2012 +0100
@@ -524,3 +524,7 @@
     border-top: 1px solid #999;
 }
 /** end of comparison **/
+
+.breadcrumb a:hover {
+    text-decoration:underline;
+}
--- a/mercurial/templates/static/style-paper.css	Tue Jan 08 04:15:46 2013 +0100
+++ b/mercurial/templates/static/style-paper.css	Wed Nov 28 20:21:26 2012 +0100
@@ -318,3 +318,11 @@
 .block {
     border-top: 1px solid #999;
 }
+
+.breadcrumb {
+    color: gray;
+}
+
+.breadcrumb a {
+    color: blue;
+}