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

svn copy not updating Last Changed Rev

From: Jon DeVree <jadevree_at_mtu.edu>
Date: Mon, 29 Mar 2010 13:55:59 -0400

I noticed that when you svn copy a directory (like for branching and
tagging) the 'Last Changed Rev' in svn info only moves forward on the
root of the copy and not every file. The most recent revision in svn log
will show up as the copy revision though. Shouldn't the 'Last Changed
Rev' on a path always be the same as the most recent revision shown in
svn log for the same path?

I noticed this on svn 1.4.2, but it shows up in 1.6.9 as well.
Here is an example from svn 1.6.9 operating with a local repository, but
I originally noticed this on svn 1.4.2 with the svn+ssh protocol.

$ svn copy -m "test branch" file:///tmp/svn-repo/trunk
file:///tmp/svn-repo/branches/mine

Committed revision 5.

SVN info on the root of the copy shows the expected information:

$ svn info file:///tmp/svn-repo/branches/mine
Path: mine
URL: file:///tmp/svn-repo/branches/mine
Repository Root: file:///tmp/svn-repo
Repository UUID: f5a3ca28-02f1-438b-b454-8e94791581c1
Revision: 5
Node Kind: directory
Last Changed Author: jadevree
Last Changed Rev: 5
Last Changed Date: 2010-03-29 13:43:06 -0400 (Mon, 29 Mar 2010)

But SVN info on the file that got copied with the branch is wrong:

$ svn info file:///tmp/svn-repo/branches/mine/file
Path: file
Name: file
URL: file:///tmp/svn-repo/branches/mine/file
Repository Root: file:///tmp/svn-repo
Repository UUID: f5a3ca28-02f1-438b-b454-8e94791581c1
Revision: 5
Node Kind: file
Last Changed Author: jadevree
Last Changed Rev: 2
Last Changed Date: 2010-03-29 13:40:30 -0400 (Mon, 29 Mar 2010)

SVN log shows revision 5 as the most recent:

$ svn log file:///tmp/svn-repo/branches/mine/file
------------------------------------------------------------------------
r5 | jadevree | 2010-03-29 13:43:06 -0400 (Mon, 29 Mar 2010) | 1 line

test branch
------------------------------------------------------------------------
r2 | jadevree | 2010-03-29 13:40:30 -0400 (Mon, 29 Mar 2010) | 1 line

foo
------------------------------------------------------------------------

Interestingly enough, this doesn't happen if you do a local copy +
commit instead of a server side copy. Having peeked at the fsfs revision
files, it seems the two types of copies are represented quite a bit
differently internally.

$ svn copy trunk branches/bar
A branches/bar
$ svn commit -m "bar"
Adding branches/bar
Adding branches/bar/file

Committed revision 3.
$ svn info file:///tmp/svn-repo/branches/bar/file
Path: file
Name: file
URL: file:///tmp/svn-repo/branches/bar/file
Repository Root: file:///tmp/svn-repo
Repository UUID: f5a3ca28-02f1-438b-b454-8e94791581c1
Revision: 3
Node Kind: file
Last Changed Author: jadevree
Last Changed Rev: 3
Last Changed Date: 2010-03-29 13:40:53 -0400 (Mon, 29 Mar 2010)

-- 
Jon
"lib64 is a wart on history and should never have been there."
        -Tollef Fog Heen
Received on 2010-03-29 19:56:40 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.