You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2020/02/11 23:02:07 UTC

[allura] branch db/8350 created (now ab70f74)

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

brondsem pushed a change to branch db/8350
in repository https://gitbox.apache.org/repos/asf/allura.git.


      at ab70f74  [#8350] coerce non-unicode (e.g. WINDOWS-1251 encoded) hg paths into unicode

This branch includes the following new commits:

     new ab70f74  [#8350] coerce non-unicode (e.g. WINDOWS-1251 encoded) hg paths into unicode

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



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

Posted by br...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

brondsem pushed a commit to branch db/8350
in repository https://gitbox.apache.org/repos/asf/allura.git

commit ab70f744c8221ab2fa206b4b7ea810813c8c18e8
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 d4708d1..3a12d35 100644
--- a/Allura/allura/model/repository.py
+++ b/Allura/allura/model/repository.py
@@ -1236,7 +1236,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:
@@ -1820,7 +1820,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:
@@ -1831,7 +1831,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('/')
@@ -1842,7 +1842,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('/')