On Wed, Jun 27, 2012 at 4:33 PM, Johan Corveleyn <jcorvel_at_gmail.com> wrote:
> I noticed this while investigating (other) problems with incorrect
> LastChangedRev's (subtle form of working copy corruption):
>
> [[[
> C:\Temp\svntest>svnadmin create testrepos
>
> C:\Temp\svntest>set REPOS=file:///C:/Temp/svntest/testrepos
>
> C:\Temp\svntest>svn mkdir --parents -mm %REPOS%/dir/subdir
>
> Committed revision 1.
>
> C:\Temp\svntest>svn co %REPOS% wc
> A wc\dir
> A wc\dir\subdir
> Checked out revision 1.
>
> C:\Temp\svntest>echo blah > wc\dir\subdir\test.txt
>
> C:\Temp\svntest>svn add wc\dir\subdir\test.txt
> A wc\dir\subdir\test.txt
>
> C:\Temp\svntest>svn commit -mm wc
> Adding wc\dir\subdir\test.txt
> Transmitting file data .
> Committed revision 2.
>
> C:\Temp\svntest>svn up wc
> Updating 'wc':
> At revision 2.
>
> C:\Temp\svntest>svn mv wc\dir wc\dir2
> A wc\dir2
> D wc\dir
> D wc\dir\subdir
> D wc\dir\subdir\test.txt
>
> C:\Temp\svntest>echo blahblah >> wc\dir2\subdir\test.txt
>
> C:\Temp\svntest>svn commit -mm wc
> Deleting wc\dir
> Adding wc\dir2
> Sending wc\dir2\subdir\test.txt
> Transmitting file data .
> Committed revision 3.
>
> C:\Temp\svntest>svn info wc\dir2\subdir
> Path: wc\dir2\subdir
> Working Copy Root Path: C:\Temp\svntest\wc
> URL: file:///C:/Temp/svntest/testrepos/dir2/subdir
> Repository Root: file:///C:/Temp/svntest/testrepos
> Repository UUID: e4b72795-63eb-4b45-afcc-ee0353e630af
> Revision: 3
> Node Kind: directory
> Schedule: normal
> Last Changed Author: jcorve0
> Last Changed Rev: 2
> Last Changed Date: 2012-06-27 16:21:39 +0200 (wo, 27 jun 2012)
>
>
> C:\Temp\svntest>svn info %REPOS%/dir2/subdir
> Path: subdir
> URL: file:///C:/Temp/svntest/testrepos/dir2/subdir
> Repository Root: file:///C:/Temp/svntest/testrepos
> Repository UUID: e4b72795-63eb-4b45-afcc-ee0353e630af
> Revision: 3
> Node Kind: directory
> Last Changed Author: jcorve0
> Last Changed Rev: 3
> Last Changed Date: 2012-06-27 16:23:08 +0200 (wo, 27 jun 2012)
> ]]]
>
> As you can see, the LastChangedRev of subdir is 2 in the working copy,
> but 3 in the repository (with the same working revision). If you
> create a new checkout of this repository, subdir's LastChangedRev will
> be 3, which is correct. So the wrong LastChangedRev is only there in
> the working copy where this commit originated.
>
> - LastChangedRev of 'dir' and test.txt are still correct (3 in this
> case), it's only 'subdir' that's wrong.
>
> - If the file mod of dir/subdir/test.txt isn't committed together with
> the move of dir->dir2, then there is also no problem: in that case,
> subdir and test.txt will have LCR 2 both in the working copy and in
> the repository (so it's not increased, but that's consistent with
> what's in the repository).
Forgot to mention: the above is with 1.7.5 (SlikSVN). I'll try with
trunk sometime later.
--
Johan
Received on 2012-06-27 16:37:18 CEST