# HG changeset patch # User Eric Sumner # Date 2015-02-05 23:52:57 # Node ID de32e9881698bfe6536cee497bdff81dc928fa85 # Parent c6666395fdd2e72c06d1f4c5fd5966cff339f388 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. diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py --- a/mercurial/bundle2.py +++ b/mercurial/bundle2.py @@ -497,7 +497,7 @@ class unpackermixin(object): """read exactly 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)