bundle2.unpackermixin: default value for seek() whence parameter
authorEric Sumner <ericsumner@fb.com>
Thu, 05 Feb 2015 15:52:57 -0800
changeset 24070 de32e9881698
parent 24069 c6666395fdd2
child 24071 184a2f6f40da
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.
mercurial/bundle2.py
--- 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)