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)
--- 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.