allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [06/50] git commit: [#5120] Quote branch/tag urls
Date Wed, 24 Apr 2013 22:30:31 GMT
[#5120] Quote branch/tag urls

- So they get highlighted properly in sidebar

Signed-off-by: Tim Van Steenburgh <tvansteenburgh@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/cj/5655
Commit: 9bf778a3080af953372a7b24aca5abe79c2da764
Parents: 0dcf37f
Author: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Authored: Tue Apr 23 14:28:30 2013 +0000
Committer: Tim Van Steenburgh <tvansteenburgh@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(


Mime
View raw message