diff --git a/views/blob.html b/views/blob.html
index 6e493ab..e44ff99 100644
--- a/views/blob.html
+++ b/views/blob.html
@@ -4,10 +4,11 @@
% if not dirname.raw:
-% relroot = './'
+% reltree = './'
% else:
-% relroot = '../' * (len(dirname.split('/')) - 1)
+% reltree = '../' * (len(dirname.split('/')) - 1)
% end
+% relroot = reltree + '../' * (len(repo.branch.split('/')) - 1)
git » {{repo.name}} »
{{repo.branch}} » {{dirname.unicode}}/{{fname.unicode}}
@@ -21,13 +22,13 @@
- [{{repo.branch}}] /
-% base = smstr(relroot)
+ [{{repo.branch}}] /
+% base = smstr(reltree)
% for c in dirname.split('/'):
% if not c.raw:
% continue
diff --git a/views/branch.html b/views/branch.html
index 1cc011d..0d3e891 100644
--- a/views/branch.html
+++ b/views/branch.html
@@ -2,14 +2,17 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+% relroot = '../' * (len(repo.branch.split('/')) - 1)
+
git » {{repo.name}} » {{repo.branch}}
-
+
-git »
- {{repo.name}} »
+
@@ -35,7 +38,7 @@
% include paginate more = more, offset = offset
% kwargs = dict(repo=repo, commits=commits,
-% shorten=shorten, repo_root="../..")
+% shorten=shorten, repo_root=relroot + "../..")
% include commit-list **kwargs
diff --git a/views/tree.html b/views/tree.html
index 5edacb8..f983b75 100644
--- a/views/tree.html
+++ b/views/tree.html
@@ -4,10 +4,11 @@
% if not dirname.raw:
-% relroot = './'
+% reltree = './'
% else:
-% relroot = '../' * (len(dirname.split('/')) - 1)
+% reltree = '../' * (len(dirname.split('/')) - 1)
% end
+% relroot = reltree + '../' * (len(repo.branch.split('/')) - 1)
git » {{repo.name}} »
{{repo.branch}} » {{dirname.unicode}}
@@ -19,13 +20,13 @@
- [{{repo.branch}}] /
-% base = smstr(relroot)
+ [{{repo.branch}}] /
+% base = smstr(reltree)
% for c in dirname.split('/'):
% if not c.raw:
% continue