--- a/mercurial/util.py Sat Jul 24 00:15:29 2010 +0200 +++ b/mercurial/util.py Sat Jul 24 15:20:29 2010 +0200 @@ -932,7 +932,7 @@ collected += len(chunk) if collected >= targetsize: break - if collected < targetsize: + else: self.iter = False self.buf = collector.getvalue() if len(self.buf) == l: