Mercurial > public > mercurial-scm > hg
diff mercurial/streamclone.py @ 28532:ed75909c4c67
merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 15 Mar 2016 14:10:46 -0700 |
parents | 61d1a3cc6e1c aa440c3d7c5d |
children | f32f8bf5dc4c |
line wrap: on
line diff
--- a/mercurial/streamclone.py Fri Mar 11 20:34:49 2016 -0500 +++ b/mercurial/streamclone.py Tue Mar 15 14:10:46 2016 -0700 @@ -206,7 +206,8 @@ # partially encode name over the wire for backwards compat yield '%s\0%d\n' % (store.encodedir(name), size) if size <= 65536: - yield svfs.read(name) + with svfs(name, 'rb') as fp: + yield fp.read(size) else: for chunk in util.filechunkiter(svfs(name), limit=size): yield chunk