[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r930990 - /subversion/trunk/subversion/tests/cmdline/patch_tests.py

From: Stefan Sperling <stsp_at_elego.de>
Date: Tue, 6 Apr 2010 21:43:58 +0200

On Tue, Apr 06, 2010 at 12:44:34AM -0000, rhuijben_at_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
Received on 2010-04-06 21:44:28 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.