bundle2.unpackermixin: default value for seek() whence parameter
The contract for seek() includes seeking to an offset from the beginning of the
file when whence is omitted; put this implementation in compliance.
--- a/mercurial/bundle2.py Fri Feb 06 23:40:46 2015 +0100
+++ b/mercurial/bundle2.py Thu Feb 05 15:52:57 2015 -0800
@@ -497,7 +497,7 @@
"""read exactly <size> bytes from the stream"""
return changegroup.readexactly(self._fp, size)
- def seek(self, offset, whence):
+ def seek(self, offset, whence=0):
"""move the underlying file pointer"""
if self._seekable:
return self._fp.seek(offset, whence)