changeset 36512:d697e39f61a6

convert: avoid closing ui.fout in subversion code (issue5807) Don't close 'fp' (= 'ui.fout') stream to prevent 'ValueError: I/O operation on closed file' (Bug #5807). Regression of changeset 30261:6bed17ba00a1 (https://www.mercurial-scm.org/repo/hg/rev/6bed17ba00a1)
author Sascha Nemecek <nemecek@wienfluss.net>
date Wed, 28 Feb 2018 16:24:39 +0100
parents aa3294027936
children 6ad140dc4269
files hgext/convert/subversion.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/subversion.py	Sun Jan 07 11:53:07 2018 +0900
+++ b/hgext/convert/subversion.py	Wed Feb 28 16:24:39 2018 +0100
@@ -149,7 +149,7 @@
         pickle.dump(str(inst), fp, protocol)
     else:
         pickle.dump(None, fp, protocol)
-    fp.close()
+    fp.flush()
     # With large history, cleanup process goes crazy and suddenly
     # consumes *huge* amount of memory. The output file being closed,
     # there is no need for clean termination.