On Tue, Apr 06, 2010 at 12:44:34AM -0000, rhuij...@apache.org wrote: > Author: rhuijben > Date: Tue Apr 6 00:44:34 2010 > New Revision: 930990 > > URL: http://svn.apache.org/viewvc?rev=930990&view=rev > Log: > Properly close temporary file handles to allow the delete of the > temporary files to succeed on Windows. This resolves the > > Running tests in patch_tests.py [25/43].............FAILURE > > error reported by not parallel Windows buildbot. > > * subversion/tests/cmdline/patch_tests.py > (patch, patch_absolute_paths, patch_offset, > patch_chopped_leading_spaces, patch_strip1, > patch_add_new_dir, patch_reject, patch_keywords, > patch_with_fuzz, patch_reverse, patch_no_svn_eol_style, > patch_with_svn_eol_style, patch_with_svn_eol_style_uncommitted > patch_with_include_patterns, patch_with_exclude_patterns, > patch_with_include_exclude_patterns): Close files opened by mkstemp.
Before I apply a similar fix to patch_no_index_line(), I wanted to ask if is there a special reason why you are closing the fd right after creating the temporary file? Can't we delay closing it until we're ready to remove the file, after patching? So that closing the patch file is the very last thing each test is doing? Stefan