Mercurial > public > mercurial-scm > hg
comparison mercurial/hgweb/protocol.py @ 11585:5d907fbb9703
protocol: unify stream_out command
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 14 Jul 2010 16:19:27 -0500 |
parents | 1af96b090116 |
children | d054cc5c7737 |
comparison
equal
deleted
inserted
replaced
11584:1af96b090116 | 11585:5d907fbb9703 |
---|---|
112 text = error.replace(repo.root + os.path.sep, '') | 112 text = error.replace(repo.root + os.path.sep, '') |
113 raise ErrorResponse(code, text) | 113 raise ErrorResponse(code, text) |
114 finally: | 114 finally: |
115 fp.close() | 115 fp.close() |
116 os.unlink(tempname) | 116 os.unlink(tempname) |
117 | |
118 def stream_out(repo, req): | |
119 req.respond(HTTP_OK, HGTYPE) | |
120 try: | |
121 for chunk in streamclone.stream_out(repo): | |
122 yield chunk | |
123 except streamclone.StreamException, inst: | |
124 yield str(inst) |