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

RE: svn commit: r995388 - /subversion/trunk/subversion/tests/cmdline/update_tests.py

From: Bert Huijben <bert_at_vmoo.com>
Date: Thu, 9 Sep 2010 15:20:52 +0200

> -----Original Message-----
> From: stylesen_at_apache.org [mailto:stylesen_at_apache.org]
> Sent: donderdag 9 september 2010 13:47
> To: commits_at_subversion.apache.org
> Subject: svn commit: r995388 -
> /subversion/trunk/subversion/tests/cmdline/update_tests.py
>
> Author: stylesen
> Date: Thu Sep 9 11:47:22 2010
> New Revision: 995388
>
> URL: http://svn.apache.org/viewvc?rev=995388&view=rev
> Log:
> Add a test for issue #3471: 'svn up touches file w/ lock & svn:keywords
> property'.
>
> * subversion/tests/cmdline/update_tests.py
> (update_with_file_lock_and_keywords_property_set): New test case.
> (test_list): Add the above test case and mark it as XFail.
>
> Patchy by: Vijayaguru G <vijay_at_collab.net>
>
> Modified:
> subversion/trunk/subversion/tests/cmdline/update_tests.py
>
> Modified: subversion/trunk/subversion/tests/cmdline/update_tests.py
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/
> update_tests.py?rev=995388&r1=995387&r2=995388&view=diff
> ==========================================================
> ====================
> --- subversion/trunk/subversion/tests/cmdline/update_tests.py (original)
> +++ subversion/trunk/subversion/tests/cmdline/update_tests.py Thu Sep 9
> 11:47:22 2010
> @@ -5720,6 +5720,30 @@ def update_with_excluded_subdir(sbox):
> svntest.actions.run_and_verify_update(wc_dir, expected_output,
> expected_disk, expected_status)
>
> +#----------------------------------------------------------------------
> +# Test for issue #3471 'svn up touches file w/ lock & svn:keywords property'
> +#
> +# Marked as XFail until the issue is fixed.
> +def update_with_file_lock_and_keywords_property_set(sbox):
> + """update with file lock & keywords property set"""
> + sbox.build()
> +
> + wc_dir = sbox.wc_dir
> +
> + mu_path = os.path.join(wc_dir, 'A', 'mu')
> + svntest.main.file_append(mu_path, '$Id$')
> + svntest.main.run_svn(None, 'ps', 'svn:keywords', 'Id', mu_path)
> + svntest.main.run_svn(None, 'lock', mu_path)
> + mu_ts_before_update = os.path.getmtime(mu_path)

I think you need a 1 second sleep here. (The tests disable the normal sleep on invoking svn, which you do need here). Otherwise you might miss the change on filesystems with a 1 second timestamp granularity (e.g ext3fs) if the update takes less than one second,

> +
> + # Issue #3471 manifests itself here; The timestamp of 'mu' gets updated
> + # to the time of the last "svn up".
> + sbox.simple_update()
> + mu_ts_after_update = os.path.getmtime(mu_path)
> + if (mu_ts_before_update != mu_ts_after_update):
> + print("The timestamp of 'mu' before and after update does not match.")
> + raise svntest.Failure
> +
Received on 2010-09-09 15:22:33 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.