[PATCH] Use try/finally to close files on error
Victor Stinner
victor.stinner at haypocalc.com
Thu Nov 3 10:17:48 CDT 2011
Le Mercredi 2 Novembre 2011 16:54:45 vous avez écrit :
> We're aware of that. But until you point to -actual- bugs that this
> fixes, I consider this bloat.
The patch fixes 4 functions by closing explicitly files:
"Close the file in ignore.ignore(), revlog.revlog._loadchunk(),
ui.ui.readconfig()."
I consider these changes as bugfixes because it is important to close files to
ensure that data is written on disk (even if a os.fsync() is even better ;-)).
Would you like a shorter patch with only these fixes?
Victor
More information about the Mercurial-devel
mailing list