Mercurial > public > mercurial-scm > hg-stable
diff mercurial/sshserver.py @ 6925:87abfefafe02
make streamclone.stream_out() a generator
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Fri, 15 Aug 2008 13:25:57 +0200 |
parents | 8ff321a381d0 |
children | 553aa0cbeab6 |
line wrap: on
line diff
--- a/mercurial/sshserver.py Tue Jul 22 18:21:37 2008 +0200 +++ b/mercurial/sshserver.py Fri Aug 15 13:25:57 2008 +0200 @@ -204,4 +204,10 @@ os.unlink(tempname) def do_stream_out(self): - streamclone.stream_out(self.repo, self.fout) + try: + for chunk in streamclone.stream_out(self.repo): + self.fout.write(chunk) + self.fout.flush() + except streamclone.StreamException, inst: + self.fout.write(str(inst)) + self.fout.flush()