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

Re: [PATCH] Test case for issue #3471: svn up touches file w/ lock & svn:keywords property

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Thu, 09 Sep 2010 15:57:40 +0100

vijayaguru <vijay_at_collab.net> writes:

> +#----------------------------------------------------------------------
> +# Test for issue #3471 'svn up touches file w/ lock & svn:keywords property'
> +#
> +# Marked as XFail until that 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)

The keyword is present but not expanded.

> +
> + # Issue #3471 manifests itself here; The timestamp of 'mu' gets updated
> + # to the time of the last "svn up".
> + sbox.simple_update()

That update expands the keyword, so I would expect the timestamp to
change.

> + 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

Why is this an failure?

Perhaps there should be a second call to update, with a check that the
second doesn't change the timestamp. With two update
sleep_for_timestamps could be used to introduce the necessary delay to
trigger the bug.

-- 
Philip
Received on 2010-09-09 16:58:48 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.