diff --git a/templates/spartan/branches.tmpl b/templates/spartan/branches.tmpl
new file mode 100644
--- /dev/null
+++ b/templates/spartan/branches.tmpl
@@ -0,0 +1,26 @@
+#header#
+
#repo|escape#: branches
+
+
+
+
+
+
+
+branches:
+
+
+
+#footer#
diff --git a/templates/spartan/changelog.tmpl b/templates/spartan/changelog.tmpl
--- a/templates/spartan/changelog.tmpl
+++ b/templates/spartan/changelog.tmpl
@@ -11,6 +11,7 @@
shortlog
graph
tags
+branches
files
#archives%archiveentry#
rss
diff --git a/templates/spartan/changeset.tmpl b/templates/spartan/changeset.tmpl
--- a/templates/spartan/changeset.tmpl
+++ b/templates/spartan/changeset.tmpl
@@ -8,6 +8,7 @@
shortlog
graph
tags
+branches
files
raw
#archives%archiveentry#
diff --git a/templates/spartan/fileannotate.tmpl b/templates/spartan/fileannotate.tmpl
--- a/templates/spartan/fileannotate.tmpl
+++ b/templates/spartan/fileannotate.tmpl
@@ -8,6 +8,7 @@
shortlog
graph
tags
+branches
changeset
files
file
diff --git a/templates/spartan/filediff.tmpl b/templates/spartan/filediff.tmpl
--- a/templates/spartan/filediff.tmpl
+++ b/templates/spartan/filediff.tmpl
@@ -8,6 +8,7 @@
shortlog
graph
tags
+branches
changeset
file
revisions
diff --git a/templates/spartan/filelog.tmpl b/templates/spartan/filelog.tmpl
--- a/templates/spartan/filelog.tmpl
+++ b/templates/spartan/filelog.tmpl
@@ -12,6 +12,7 @@
shortlog
graph
tags
+branches
file
annotate
rss
diff --git a/templates/spartan/filerevision.tmpl b/templates/spartan/filerevision.tmpl
--- a/templates/spartan/filerevision.tmpl
+++ b/templates/spartan/filerevision.tmpl
@@ -8,6 +8,7 @@
shortlog
graph
tags
+branches
changeset
files
revisions
diff --git a/templates/spartan/graph.tmpl b/templates/spartan/graph.tmpl
--- a/templates/spartan/graph.tmpl
+++ b/templates/spartan/graph.tmpl
@@ -12,6 +12,7 @@
changelog
shortlog
tags
+branches
files
diff --git a/templates/spartan/manifest.tmpl b/templates/spartan/manifest.tmpl
--- a/templates/spartan/manifest.tmpl
+++ b/templates/spartan/manifest.tmpl
@@ -8,6 +8,7 @@
shortlog
graph
tags
+branches
changeset
#archives%archiveentry#
diff --git a/templates/spartan/map b/templates/spartan/map
--- a/templates/spartan/map
+++ b/templates/spartan/map
@@ -44,6 +44,8 @@ filerevchild = '
fileannotatechild = ' |
child: | #node|short# |
'
tags = tags.tmpl
tagentry = '#node# #tag|escape#'
+branches = branches.tmpl
+branchentry = '#node# #branch|escape#'
diffblock = '#lines#
'
changelogtag = 'tag: | #tag|escape# |
'
changesettag = 'tag: | #tag|escape# |
'
diff --git a/templates/spartan/search.tmpl b/templates/spartan/search.tmpl
--- a/templates/spartan/search.tmpl
+++ b/templates/spartan/search.tmpl
@@ -8,6 +8,7 @@
shortlog
graph
tags
+branches
files
#archives%archiveentry#
diff --git a/templates/spartan/shortlog.tmpl b/templates/spartan/shortlog.tmpl
--- a/templates/spartan/shortlog.tmpl
+++ b/templates/spartan/shortlog.tmpl
@@ -11,6 +11,7 @@
changelog
graph
tags
+branches
files
#archives%archiveentry#
rss
diff --git a/templates/spartan/tags.tmpl b/templates/spartan/tags.tmpl
--- a/templates/spartan/tags.tmpl
+++ b/templates/spartan/tags.tmpl
@@ -11,6 +11,7 @@
changelog
shortlog
graph
+branches
files
rss
atom
diff --git a/tests/test-hgweb-filelog.out b/tests/test-hgweb-filelog.out
--- a/tests/test-hgweb-filelog.out
+++ b/tests/test-hgweb-filelog.out
@@ -486,6 +486,7 @@ 200 Script output follows
shortlog
graph
tags
+branches
file
annotate
rss