##// END OF EJS Templates
py3: do not pass a memoryview to bdiff.bdiff()...
Yuya Nishihara -
r36643:edd3974b default
parent child Browse files
Show More
@@ -30,9 +30,17 b' blocks = bdiff.blocks'
30 fixws = bdiff.fixws
30 fixws = bdiff.fixws
31 patches = mpatch.patches
31 patches = mpatch.patches
32 patchedsize = mpatch.patchedsize
32 patchedsize = mpatch.patchedsize
33 textdiff = bdiff.bdiff
33 _textdiff = bdiff.bdiff
34 splitnewlines = bdiff.splitnewlines
34 splitnewlines = bdiff.splitnewlines
35
35
36 # On Python 3, util.buffer() creates a memoryview, which appears not
37 # supporting the buffer protocol
38 if pycompat.ispy3:
39 def textdiff(a, b):
40 return _textdiff(bytes(a), bytes(b))
41 else:
42 textdiff = _textdiff
43
36 class diffopts(object):
44 class diffopts(object):
37 '''context is the number of context lines
45 '''context is the number of context lines
38 text treats all files as text
46 text treats all files as text
General Comments 0
You need to be logged in to leave comments. Login now