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

Re: forcing update of keyword expansions in a working copy

From: Vincent Lefevre <vincent-svn_at_vinc17.net>
Date: Thu, 1 Oct 2020 10:27:31 +0200

On 2020-09-30 22:27:47 -0400, Nathan Hartman wrote:
> Searching through the issues database, I came across issue #4585 [1]
> which you filed previously and this sounds related to the same issue.

This was not this bug. What I did was to change svn:keywords from
"Id Date" to "Id" on various files (which used only the Id keyword),
and the commit did only that. But for some of these files (those
that did not have any additional commits later), the expansion of
the Id keyword was still the one from the previous commit. In #4585,
the svn:keywords does not change, which triggers a bug. But here,
svn:keywords had changed.

The commit was done in December 2017 on a Debian/stable machine.
The svn version was 1.9.5 (Debian package 1.9.5-1+deb9u1), and
the working copy was on the same machine.

Now the machine has svn 1.10.4, but for files that didn't had new
commits, "svn up" on the working copy doesn't change anything, so
that these files were still affected by the old issue.

I've just tried to reproduce the bug with the following script:

------------------------------------------------------------
#!/bin/sh

set -e

mkdir my-test-svn
cd my-test-svn

svnadmin create svn
svn co file://`pwd`/svn wc1
svn co file://`pwd`/svn wc2

cd wc1
mkdir dir
printf '# \044Id\044\n' > dir/file
svn add dir
svn propset svn:keywords "Id Date" dir/file
svn ci -m "add dir/file"
svn update
cat dir/file

cd ../wc2
svn update
cat dir/file
svn propset svn:keywords "Id" dir/file
svn ci -m "new keywords"
cat dir/file
svn update
cat dir/file

cd ../wc1
svn update
cat dir/file
------------------------------------------------------------

on a machine that has svn 1.9.4 (gcc119.fsffrance.org), but
I haven't noticed any issue (I expected the 3rd and 4th cat
output to be incorrect).

> If the file timestamp changes, but not the file contents ('touch' the
> file and then run 'svn update'), does keyword re-expansion occur?

No, this is never done. You can try by changing the Id keyword
expansion of a file. A "svn update" never fixes it to the correct
value.

> If the file contents change (e.g., add 1 character to the file
> contents then run 'svn update') does the expected keyword expansion
> take place?

Ditto.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
Received on 2020-10-01 10:27:48 CEST

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

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