You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Christian Franke <Ch...@t-online.de> on 2009/10/23 20:59:06 UTC
Invalid last changed info after svn copy WC -> WC ?
Hi,
if 'svn copy' is used to copy a WC dir to a new WC dir, the 'Last
Changed Rev' info of the new WC files is incorrect after the commit.
Steps to reproduce in an empty dir:
(tested with svn 1.6.5 and 1.4.2)
$ svnadmin create ./repo
$ svn co "file://$(pwd)/repo" ./work
Checked out revision 0.
$ cd ./work
$ svn mkdir trunk tags
A trunk
A tags
$ cat > trunk/file.txt <<'EOF'
$Revision$
$Date$
EOF
$ svn add trunk/file.txt
A trunk/file.txt
$ svn propset svn:keywords 'Revision Date' trunk/file.txt
property 'svn:keywords' set on 'trunk/file.txt'
$ svn commit -m 'first'
Adding tags
Adding trunk
Adding trunk/file.txt
Committed revision 1.
$ svn copy trunk tags/one
A tags/one
$ svn commit -m 'tag one'
Adding tags/one
Committed revision 2.
$ svn update
At revision 2.
$ diff -us trunk/file.txt tags/one/file.txt
--- trunk/file.txt 2009-10-23 10:28:12.218750000 +0200
$++ tags/one/file.txt 2009-10-23 10:28:14.796875000 +0200
@@ -1,2 +1,2 @@
-$Revision: 1 $
-$Date: 2009-10-23 10:28:12 +0200 (Fri, 23 Oct 2009) $
+$Revision: 2 $
+$Date: 2009-10-23 10:28:14 +0200 (Fri, 23 Oct 2009) $
$ svn info trunk/file.txt | grep Rev
Revision: 2
Last Changed Rev: 1
$ svn info tags/one/file.txt | grep Rev
Revision: 2
Last Changed Rev: 2 <<---- Bug ?
$ cd ..
A fresh checkout of the above commit is OK:
$ svn co "file://$(pwd)/repo" ./other
A other/trunk
A other/trunk/file.txt
A other/tags
A other/tags/one
A other/tags/one/file.txt
Checked out revision 2.
$ cd ./other
$ diff -us trunk/file.txt tags/one/file.txt
Files trunk/file.txt and tags/one/file.txt are identical
$ svn info trunk/file.txt | grep Rev
Revision: 2
Last Changed Rev: 1
$ svn info tags/one/file.txt | grep Rev
Revision: 2
Last Changed Rev: 1 <<---- OK
Thanks,
Christian
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2410767
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: Invalid last changed info after svn copy WC -> WC ?
Posted by Christian Franke <Ch...@t-online.de>.
Christian Franke wrote:
> Hi,
>
> if 'svn copy' is used to copy a WC dir to a new WC dir, the 'Last
> Changed Rev' info of the new WC files is incorrect after the commit.
>
>
> Steps to reproduce in an empty dir:
> (tested with svn 1.6.5 and 1.4.2)
>
Can also be reproduced with svn 1.6.6 (r40053, Cygwin)
Simplified testcase:
$ svnadmin create ./repo
$ svn co "file://$(pwd)/repo" ./work
Checked out revision 0.
$ cd ./work
$ svn mkdir trunk tags
A trunk
A tags
$ echo test > trunk/file.txt
$ svn add trunk/file.txt
A trunk/file.txt
$ svn commit -m 'first'
Adding tags
Adding trunk
Adding trunk/file.txt
Committed revision 1.
$ svn copy trunk tags/one
A tags/one
$ svn commit -m 'tag one'
Adding tags/one
Committed revision 2.
$ svn update
At revision 2.
$ svn info tags/one/file.txt | grep Rev
Revision: 2
Last Changed Rev: 2 <--- Bug: differs from info in repo ---
$ rm -rf tags/one
$ svn update
A tags/one
A tags/one/file.txt
Updated to revision 2.
$ svn info tags/one/file.txt | grep Rev
Revision: 2
Last Changed Rev: 1 <--- Now OK ---
Not a big problem unless the wrong last changed info affects future commits.
Christian
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2412400
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: Invalid last changed info after svn copy WC -> WC ?
Posted by Christian Franke <Ch...@t-online.de>.
Ryan Schmidt wrote:
>
> On Oct 23, 2009, at 15:59, Christian Franke wrote:
>
>> if 'svn copy' is used to copy a WC dir to a new WC dir, the 'Last
>> Changed Rev' info of the new WC files is incorrect after the commit.
>
> You need to "svn up" after doing so to get your working copy out of
> its mixed-revision state.
>
>
>
This 'svn update' was included in the testcase:
...
$ svn commit -m 'tag one'
Adding tags/one
Committed revision 2.
$ svn update
At revision 2.
$ diff -us trunk/file.txt tags/one/file.txt
...
A simple update does apparently not help.
This does also not help:
$ rm tags/one/file.txt && svn update
... but this helps:
$ rm -r tags/one && svn update
Christian
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2410777
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: Invalid last changed info after svn copy WC -> WC ?
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Oct 23, 2009, at 15:59, Christian Franke wrote:
> if 'svn copy' is used to copy a WC dir to a new WC dir, the 'Last
> Changed Rev' info of the new WC files is incorrect after the commit.
You need to "svn up" after doing so to get your working copy out of
its mixed-revision state.
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2410773
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].