diff -r 9f2c407caf34 -r acbe171c8fbe mercurial/changegroup.py --- a/mercurial/changegroup.py Tue Feb 22 03:10:37 2011 +0100 +++ b/mercurial/changegroup.py Tue Feb 22 16:31:01 2011 +0100 @@ -151,7 +151,7 @@ return self._stream.close() def chunklength(self): - d = readexactly(stream, 4) + d = readexactly(self._stream, 4) l = struct.unpack(">l", d)[0] if l <= 4: if l: