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/23 18:42:52 UTC

[48/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/e3d3dcab
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/e3d3dcab
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/e3d3dcab

Branch: refs/heads/cj/5120
Commit: e3d3dcabfd58c7e779d9fb1fead746a9a1035671
Parents: fff1980
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 14:29:59 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/e3d3dcab/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/e3d3dcab/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(