You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by ke...@apache.org on 2020/02/13 14:34:53 UTC

[allura] branch master updated: [#8350] coerce non-unicode (e.g. WINDOWS-1251 encoded) hg paths into unicode

This is an automated email from the ASF dual-hosted git repository.

kentontaylor pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git


The following commit(s) were added to refs/heads/master by this push:
     new 0616fbe  [#8350] coerce non-unicode (e.g. WINDOWS-1251 encoded) hg paths into unicode
0616fbe is described below

commit 0616fbe39cc303dd028aabe3b8175a8b6871cb66
Author: Dave Brondsema <da...@brondsema.net>
AuthorDate: Tue Feb 11 18:01:28 2020 -0500

    [#8350] coerce non-unicode (e.g. WINDOWS-1251 encoded) hg paths into unicode
---
 Allura/allura/model/repository.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Allura/allura/model/repository.py b/Allura/allura/model/repository.py
index b6cafad..5b3129f 100644
--- a/Allura/allura/model/repository.py
+++ b/Allura/allura/model/repository.py
@@ -1238,7 +1238,7 @@ class Commit(RepoObject, ActivityObject):
         changes = self.repo.get_changes(self._id)
         changed_paths = set()
         for change in changes:
-            node = six.ensure_text(change).strip('/')
+            node = h.really_unicode(change).strip('/')
             changed_paths.add(node)
             node_path = os.path.dirname(node)
             while node_path:
@@ -1822,7 +1822,7 @@ class GitLikeTree(object):
         self._hex = None
 
     def get_tree(self, path):
-        path = six.ensure_text(path)
+        path = h.really_unicode(path)
         if path.startswith('/'):
             path = path[1:]
         if not path:
@@ -1833,7 +1833,7 @@ class GitLikeTree(object):
         return cur
 
     def get_blob(self, path):
-        path = six.ensure_text(path)
+        path = h.really_unicode(path)
         if path.startswith('/'):
             path = path[1:]
         path_parts = path.split('/')
@@ -1844,7 +1844,7 @@ class GitLikeTree(object):
         return cur.blobs[last]
 
     def set_blob(self, path, oid):
-        path = six.ensure_text(path)
+        path = h.really_unicode(path)
         if path.startswith('/'):
             path = path[1:]
         path_parts = path.split('/')