diff -r 7546d4a272c8 -r 4d11fde55cc5 mercurial/util.py --- a/mercurial/util.py Wed Jul 14 22:59:43 2010 -0300 +++ b/mercurial/util.py Wed Jul 14 22:59:57 2010 -0300 @@ -38,8 +38,12 @@ import __builtin__ -def fakebuffer(sliceable, offset=0): - return sliceable[offset:] +if sys.version_info[0] < 3: + def fakebuffer(sliceable, offset=0): + return sliceable[offset:] +else: + def fakebuffer(sliceable, offset=0): + return memoryview(sliceable)[offset:] try: buffer except NameError: