Mercurial > public > mercurial-scm > hg-stable
diff mercurial/patch.py @ 7615:ab39d1813e51
patch: export shouldn't close files received as a parameter
We rely on __del__ to close the fd instead. Patchbomb was relying
on this behaviour, fix it.
Thanks to Manuel Barkhau for reporting it.
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Fri, 09 Jan 2009 01:36:35 +0100 |
parents | 4f58147ea829 |
children | 3cc74ee75b0d |
line wrap: on
line diff
--- a/mercurial/patch.py Thu Jan 08 14:26:30 2009 +0100 +++ b/mercurial/patch.py Fri Jan 09 01:36:35 2009 +0100 @@ -1338,8 +1338,6 @@ for chunk in diff(repo, prev, node, opts=opts): fp.write(chunk) - if fp not in (sys.stdout, repo.ui): - fp.close() for seqno, rev in enumerate(revs): single(rev, seqno+1, fp)