remotefilelog: check against bytes type instead of buffer and coerce to bytes
Fixes Python 3 compat here.
Differential Revision: https://phab.mercurial-scm.org/D5606
--- a/hgext/remotefilelog/shallowbundle.py Wed Jan 16 11:00:10 2019 -0500
+++ b/hgext/remotefilelog/shallowbundle.py Wed Jan 16 11:01:16 2019 -0500
@@ -269,8 +269,8 @@
base = fl.revision(deltabase, raw=True)
text = mdiff.patch(base, delta)
- if isinstance(text, buffer):
- text = str(text)
+ if not isinstance(text, bytes):
+ text = bytes(text)
meta, text = shallowutil.parsemeta(text)
if 'copy' in meta: