allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject git commit: [#6743] ticket:471 encode path in code browser
Date Tue, 19 Nov 2013 12:35:57 GMT
Updated Branches:
  refs/heads/master 5ecdd28fc -> 88c1fa16e


 [#6743] ticket:471 encode path in code browser


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/88c1fa16
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/88c1fa16
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/88c1fa16

Branch: refs/heads/master
Commit: 88c1fa16e71b461b9cb5ea267c9a06b1d644f689
Parents: 5ecdd28
Author: Yuriy Arhipov <yuriyarhipovua@yandex.ru>
Authored: Mon Nov 4 01:51:49 2013 +0400
Committer: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Committed: Tue Nov 19 12:22:42 2013 +0000

----------------------------------------------------------------------
 ForgeGit/forgegit/model/git_repo.py              | 2 +-
 ForgeGit/forgegit/tests/model/test_repository.py | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/88c1fa16/ForgeGit/forgegit/model/git_repo.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/model/git_repo.py b/ForgeGit/forgegit/model/git_repo.py
index a06300f..516b6b1 100644
--- a/ForgeGit/forgegit/model/git_repo.py
+++ b/ForgeGit/forgegit/model/git_repo.py
@@ -299,7 +299,7 @@ class GitImplementation(M.RepositoryImplementation):
         If id_only is True, returns only the commit ID, otherwise it returns
         detailed information about each commit.
         """
-        path = path.strip('/') if path else None
+        path = path.strip('/').encode("utf-8") if path else None
         if exclude is not None:
             revs.extend(['^%s' % e for e in exclude])
         args = ['--name-status', revs, '--', path]

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/88c1fa16/ForgeGit/forgegit/tests/model/test_repository.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/tests/model/test_repository.py b/ForgeGit/forgegit/tests/model/test_repository.py
index ea615b6..dfcd3ac 100644
--- a/ForgeGit/forgegit/tests/model/test_repository.py
+++ b/ForgeGit/forgegit/tests/model/test_repository.py
@@ -1,3 +1,5 @@
+# -*- coding: utf-8 -*-
+#
 #       Licensed to the Apache Software Foundation (ASF) under one
 #       or more contributor license agreements.  See the NOTICE file
 #       distributed with this work for additional information
@@ -280,6 +282,10 @@ class TestGitRepo(unittest.TestCase, RepoImplTestBase):
              'rename_details': {}},
             ])
 
+    def test_log_unicode(self):
+        entries = list(self.repo.log(path=u'völundr', id_only=False))
+        assert_equal(entries, [])
+
     def test_log_file(self):
         entries = list(self.repo.log(path='README', id_only=False))
         assert_equal(entries, [


Mime
View raw message