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/04/13 20:34:01 UTC
[allura] 09/22: [#8356] Some git fixes
This is an automated email from the ASF dual-hosted git repository.
brondsem pushed a commit to branch db/8356
in repository https://gitbox.apache.org/repos/asf/allura.git
commit b12d93e3eb2fb9bfb89c6c1e172dd8f197d720c7
Author: Dave Brondsema <da...@brondsema.net>
AuthorDate: Thu Apr 9 18:22:59 2020 -0400
[#8356] Some git fixes
---
ForgeGit/forgegit/model/git_repo.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/ForgeGit/forgegit/model/git_repo.py b/ForgeGit/forgegit/model/git_repo.py
index c49fbad..c940d04 100644
--- a/ForgeGit/forgegit/model/git_repo.py
+++ b/ForgeGit/forgegit/model/git_repo.py
@@ -32,6 +32,7 @@ import gitdb
from tg import tmpl_context as c
from pymongo.errors import DuplicateKeyError
from paste.deploy.converters import asbool
+import six
from ming.base import Object
from ming.orm import Mapper, session
@@ -438,7 +439,7 @@ class GitImplementation(M.RepositoryImplementation):
stream = proc.stdout
commit_lines = []
while True:
- line = stream.readline()
+ line = six.ensure_text(stream.readline())
if '\x00' in line or not(len(line)):
# hash line read, need to yield previous commit
# first, cleaning lines a bit
@@ -495,7 +496,7 @@ class GitImplementation(M.RepositoryImplementation):
odds = oid[1::2]
binsha = b''
for e, o in zip(evens, odds):
- binsha += chr(int(e + o, 16))
+ binsha += six.int2byte(int(e + o, 16))
return git.Object.new_from_sha(self._git, binsha)
def rev_parse(self, rev):