You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by tv...@apache.org on 2013/04/24 06:54:47 UTC
[42/50] [abbrv] git commit: [#5120] Quote branch/tag urls
[#5120] Quote branch/tag urls
- So they get highlighted properly in sidebar
Signed-off-by: Tim Van Steenburgh <tv...@gmail.com>
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/9bf778a3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/9bf778a3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/9bf778a3
Branch: refs/heads/tv/docs
Commit: 9bf778a3080af953372a7b24aca5abe79c2da764
Parents: 0dcf37f
Author: Tim Van Steenburgh <tv...@gmail.com>
Authored: Tue Apr 23 14:28:30 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Tue Apr 23 17:03:34 2013 +0000
----------------------------------------------------------------------
Allura/allura/controllers/repository.py | 2 +-
Allura/allura/lib/repository.py | 6 ++++--
2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/9bf778a3/Allura/allura/controllers/repository.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/repository.py b/Allura/allura/controllers/repository.py
index ef678f5..319506e 100644
--- a/Allura/allura/controllers/repository.py
+++ b/Allura/allura/controllers/repository.py
@@ -380,7 +380,7 @@ class RefsController(object):
EOR = quote(c.app.END_OF_REF_ESCAPE)
if EOR in remainder:
i = remainder.index(quote(c.app.END_OF_REF_ESCAPE))
- ref = '/'.join((ci,) + remainder[:i])
+ ref = '/'.join((ref,) + remainder[:i])
remainder = remainder[i+1:]
return self.BranchBrowserClass(ref), remainder
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/9bf778a3/Allura/allura/lib/repository.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/repository.py b/Allura/allura/lib/repository.py
index f59ec04..69736b6 100644
--- a/Allura/allura/lib/repository.py
+++ b/Allura/allura/lib/repository.py
@@ -134,7 +134,8 @@ class RepositoryApp(Application):
max_branches = 10
for b in self.repo.branches[:max_branches]:
links.append(SitemapEntry(
- b.name, self.repo.url_for_commit(b.name)+'tree/',
+ b.name,
+ quote(self.repo.url_for_commit(b.name) + 'tree/'),
small=b.count))
if len(self.repo.branches) > max_branches:
links.append(
@@ -147,7 +148,8 @@ class RepositoryApp(Application):
max_tags = 10
for b in self.repo.repo_tags[:max_tags]:
links.append(SitemapEntry(
- b.name, self.repo.url_for_commit(b.name)+'tree/',
+ b.name,
+ quote(self.repo.url_for_commit(b.name) + 'tree/'),
small=b.count))
if len(self.repo.repo_tags) > max_tags:
links.append(