mercurial/util.py
changeset 10756 cb681cc59a8d
parent 10487 7a6b5f85c3ab
child 10790 ef3668450cd0
--- a/mercurial/util.py	Mon Mar 22 11:08:52 2010 +0100
+++ b/mercurial/util.py	Tue Mar 23 11:36:19 2010 +0100
@@ -36,6 +36,13 @@
     _fastsha1 = sha1 = _sha1
     return _sha1(s)
 
+import __builtin__
+
+def fakebuffer(sliceable, offset=0):
+    return sliceable[offset:]
+if not hasattr(__builtin__, 'buffer'):
+    __builtin__.buffer = fakebuffer
+
 import subprocess
 closefds = os.name == 'posix'