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

Re: svn commit: r1207663 - in /subversion/trunk/subversion: libsvn_diff/parse-diff.c tests/cmdline/patch_tests.py

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Tue, 29 Nov 2011 10:49:15 +0000

"Bert Huijben" <bert_at_qqmail.nl> writes:

>> > It might also be possible to write an annotation for the test that
>> > configures the environment to enable the sleep within the libraries
>> > for that particular test. It would be a bit less granular (on the
>> > order of a test, not a specific command), but would be easier to
>> > maintain once the initial plumbing is in place.

Something like this would be good. Note that we don't want to change
SVN_I_LOVE_CORRUPTED_WORKING_COPIES_SO_DISABLE_SLEEP_FOR_TIMESTAMPS for
the python process as this affects all the tests running in parallel.
What we really want is a way to control the python process to clear the
env var for a single svn invocation.

Note that at present some tests do use do_sleep_for_timestamps
explicitly and this has the side-effect of changing the environment for
all parallell tests. The tests that use do_sleep_for_timestamps don't
use no_sleep_for_timestamps because it is not possible for a test to do
that without potentially breaking a parallel test.

>> Index: subversion/tests/cmdline/svntest/actions.py
>> ==========================================================
>> =========
>> --- subversion/tests/cmdline/svntest/actions.py (revision 1207768)
>> +++ subversion/tests/cmdline/svntest/actions.py (working copy)
>> @@ -1180,7 +1180,9 @@ def run_and_verify_patch(dir, patch_path,
>>
>> # Update and make a tree of the output.
>> patch_command = patch_command + args
>> + do_sleep_for_timestamps()
>> exit_code, out, err = main.run_svn(True, *patch_command)
>> + no_sleep_for_timestamps()

No, you can't use no_sleep_for_timestamps if tests are running in
parallel.

>> Index: subversion/libsvn_client/patch.c
>> ==========================================================
>> =========
>> --- subversion/libsvn_client/patch.c (revision 1207768)
>> +++ subversion/libsvn_client/patch.c (working copy)
>> @@ -2926,6 +2926,8 @@ apply_patches(/* The path to the patch file. */
>> SVN_ERR(svn_diff_close_patch_file(patch_file, iterpool));
>> svn_pool_destroy(iterpool);
>>
>> + svn_io_sleep_for_timestamps(abs_wc_path, scratch_pool);
>> +
>
> It's not the patch code that causes the problem. The operation before the
> patch should have waited until it is safe to exit.

Exactly.

-- 
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com
Received on 2011-11-29 11:49:54 CET

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.