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

Re: incorrect Last Changed Rev after upgrade from 1.6.17 to 1.7.5

From: Greg Stein <gstein_at_gmail.com>
Date: Tue, 19 Jun 2012 01:29:18 -0400

In 1.6, we erroneously used the containing directory's revision for the
file in certain cases. 1.7 is correct: the file is not changed until r4.
Maybe the directory has, but that is independent of the file.

Cheers,
-g
On Jun 19, 2012 3:02 AM, "Vincent Lefevre" <vincent-svn_at_vinc17.net> wrote:

> I've upgraded Subversion from 1.6.17 to 1.7.5 (Debian/unstable).
> And there's the following problem:
>
> Subversion 1.7.5 no longer notices a change of revision of some file
> when a parent directory has been moved. In particular, this yields
> incorrect keyword expansion.
>
> The bug can be reproduced with the following script:
>
> ------------------------------------------------------------
> #!/bin/sh
>
> set -e
>
> mkdir my-test-svn
> cd my-test-svn
>
> svnadmin create svn
> svn co file://`pwd`/svn wc
> cd wc
>
> svn mkdir dir1
> svn ci -m 'add dir1'
>
> printf '\044Revision\044\nfoo\n' > dir1/file
> svn add dir1/file
> svn propset svn:keywords Revision dir1/file
> svn ci -m 'add dir1/file'
> echo "File dir1/file:"
> cat dir1/file
>
> svn up
> svn mv dir1 dir2
> echo "File dir2/file:"
> cat dir2/file
> svn ci -m 'mv dir1 dir2'
> echo "File dir2/file:"
> cat dir2/file
>
> svn up
> echo "File dir2/file:"
> cat dir2/file
> svn info dir2/file
>
> svn mv dir2/file .
> echo "File file:"
> cat file
> svn ci -m 'mv dir2/file .'
> echo "File file:"
> cat file
>
> cd ../..
> rm -rf my-test-svn
> ------------------------------------------------------------
>
> If I grep the output with '.Revision:\|Last Changed Rev:', I get:
> * svn 1.6.17 (r1128011): 2 2 3 3 3 -1 4
> * svn 1.7.5 (r1336830): 2 2 2 2 2 2 4
>
> There are 4 differences, but only 3 really matter, because for the
> last one (-1 vs 2), the commit hasn't been done yet (so that one is
> in some intermediate state).
>
> Thus the important differences (3 vs 2) correspond to:
>
> svn ci -m 'mv dir1 dir2'
> echo "File dir2/file:"
> cat dir2/file
>
> svn up
> echo "File dir2/file:"
> cat dir2/file
> svn info dir2/file
>
> The last test of the script shows that the problem doesn't occur
> when the file itself is moved.
>
> Because of that, when checking out a repository with svn 1.7.5, some
> files seem to go back in time.
>
> FYI, my bug report in the Debian BTS:
>
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=678075
>
> --
> Vincent Lefèvre <vincent@vinc17.net> - Web: <http://www.vinc17.net/>
> 100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
>
Received on 2012-06-19 07:29:54 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.