Mercurial > hg-stable
changeset 4089:0ff50cc7acb4
extdiff: open files in binary mode
Problem noticed by Darrell Gallion.
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Thu, 15 Feb 2007 08:14:03 -0200 |
parents | 18dcc22666a0 |
children | 785ad8cd1d31 |
files | hgext/extdiff.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/extdiff.py Thu Feb 15 12:51:43 2007 +0300 +++ b/hgext/extdiff.py Thu Feb 15 08:14:03 2007 -0200 @@ -77,7 +77,7 @@ destdir = os.path.dirname(dest) if not os.path.isdir(destdir): os.makedirs(destdir) - repo.wwrite(wfn, repo.file(fn).read(mf[fn]), open(dest, 'w')) + repo.wwrite(wfn, repo.file(fn).read(mf[fn]), open(dest, 'wb')) return dirname def snapshot_wdir(files): @@ -99,7 +99,7 @@ destdir = os.path.dirname(dest) if not os.path.isdir(destdir): os.makedirs(destdir) - fp = open(dest, 'w') + fp = open(dest, 'wb') for chunk in util.filechunkiter(repo.wopener(wfn)): fp.write(chunk) return dirname