remotefilelog: the filelog data is bytes

Reviewed By: DurhamG

Differential Revision: D19651372

fbshipit-source-id: 13bf86235b95ad84beb9fe45e7abc06baec67a47
This commit is contained in:
Xavier Deguillard 2020-01-30 16:27:06 -08:00 committed by Facebook Github Bot
parent 4b2b0c6630
commit 6b328f5f7d

View File

@ -111,7 +111,7 @@ def createrevlogtext(text, copyfrom=None, copyrev=None):
traditional revlog
"""
meta = {}
if copyfrom or text.startswith("\1\n"):
if copyfrom or text.startswith(b"\1\n"):
if copyfrom:
meta["copy"] = copyfrom
meta["copyrev"] = copyrev
@ -128,8 +128,8 @@ def parsemeta(text, flags=0):
meta = p.hgmeta()
else:
meta, size = filelog.parsemeta(text)
if text.startswith("\1\n"):
s = text.index("\1\n", 2)
if text.startswith(b"\1\n"):
s = text.index(b"\1\n", 2)
text = text[s + 2 :]
return meta or {}, text