D5765: git: a little pycompat.bytestring() love to make this code work in py3
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Wed Jan 30 19:11:03 EST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG1c8943653458: git: a little pycompat.bytestring() love to make this code work in py3 (authored by durin42, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D5765?vs=13609&id=13611
REVISION DETAIL
https://phab.mercurial-scm.org/D5765
AFFECTED FILES
contrib/python3-whitelist
hgext/convert/git.py
CHANGE DETAILS
diff --git a/hgext/convert/git.py b/hgext/convert/git.py
--- a/hgext/convert/git.py
+++ b/hgext/convert/git.py
@@ -13,6 +13,7 @@
config,
error,
node as nodemod,
+ pycompat,
)
from . import (
@@ -175,7 +176,8 @@
self.catfilepipe[0].flush()
info = self.catfilepipe[1].readline().split()
if info[1] != ftype:
- raise error.Abort(_('cannot read %r object at %s') % (ftype, rev))
+ raise error.Abort(_('cannot read %r object at %s') % (
+ pycompat.bytestr(ftype), rev))
size = int(info[2])
data = self.catfilepipe[1].read(size)
if len(data) < size:
@@ -294,7 +296,7 @@
if not entry:
if not l.startswith(':'):
continue
- entry = l.split()
+ entry = tuple(pycompat.bytestr(p) for p in l.split())
continue
f = l
if entry[4][0] == 'C':
diff --git a/contrib/python3-whitelist b/contrib/python3-whitelist
--- a/contrib/python3-whitelist
+++ b/contrib/python3-whitelist
@@ -116,6 +116,7 @@
test-convert-cvsnt-mergepoints.t
test-convert-datesort.t
test-convert-filemap.t
+test-convert-git.t
test-convert-hg-sink.t
test-convert-hg-source.t
test-convert-hg-startrev.t
To: durin42, pulkit, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list