You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Julian Foad <ju...@btopenworld.com> on 2006/02/02 22:20:20 UTC

Re: Differences between WC->WC copy, URL->URL copy, and $dirent->created_rev()

Nik Clayton wrote:
> 
> I think this is a bug, or at least a strange inconsistency.  I've also 
> got a slightly simpler test case that doesn't involve Perl.
> 
> Take the attached mkrepos.sh and run it -- it's the same as the one 
> attached to my last message, save that I've added your suggested 'svn 
> update' step.
> 
>     sh mkrepos.sh /tmp/repo
> 
> Get info about /branches/test1/foo
> 
>     svn info file:///tmp/repo/branches/test1/foo
>     Path: foo
>     Name: foo
>     URL: file:///tmp/repo/branches/test1/foo
>     Repository Root: file:///tmp/repo
>     Repository UUID: 55c3d20a-b690-da11-8650-0011251291e9
>     Revision: 6
>     Node Kind: file
>     Last Changed Author: nik
>     Last Changed Rev: 2
>     Last Changed Date: 2006-01-29 10:57:32 +0000 (Sun, 29 Jan 2006)
> 
> Note that "Last Changed Rev" is 2.
> 
> Now get the log for /branches/test1/foo
> 
>     svn log file:///tmp/repo

Ah, no, that command gets the log for the whole repository, not just for the 
file you are talking about.

> ------------------------------------------------------------------------
>     r3 | nik | 2006-01-29 10:57:35 +0000 (Sun, 29 Jan 2006) | 1 line
>     Changed paths:
>        A /branches/test1 (from /trunk:2)
[...]
> ------------------------------------------------------------------------
>     r2 | nik | 2006-01-29 10:57:32 +0000 (Sun, 29 Jan 2006) | 1 line
>     Changed paths:
>        A /trunk/bar
>        A /trunk/foo
[...]
> ------------------------------------------------------------------------
> 
> According to the log, there was a change to this file in r3.  'svn info' 
> says it was changed in r2.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Differences between WC->WC copy, URL->URL copy, and $dirent->created_rev()

Posted by Nik Clayton <ni...@ngo.org.uk>.
Julian Foad wrote:
 > Nik Clayton wrote:
>> Take the attached mkrepos.sh and run it -- it's the same as the one 
>> attached to my last message, save that I've added your suggested 'svn 
>> update' step.
>>
>>     sh mkrepos.sh /tmp/repo
>>
>> Get info about /branches/test1/foo
>>
>>     svn info file:///tmp/repo/branches/test1/foo
[...]
>>     Last Changed Rev: 2
>>
>> Note that "Last Changed Rev" is 2.
>>
>> Now get the log for /branches/test1/foo
>>
>>     svn log file:///tmp/repo
> 
> Ah, no, that command gets the log for the whole repository, not just for 
> the file you are talking about.

My mistake.  That command should have been:

     svn log file:///tmp/repo/branches/test1/foo

which still shows:

     ------------------------------------------------------------------------
     r3 | nik | 2006-02-03 03:12:56 +0000 (Fri, 03 Feb 2006) | 1 line
     Changed paths:
        A /branches/test1 (from /trunk:2)

     Create test1 with "svn copy trunk branches/test1"
     ------------------------------------------------------------------------
     r2 | nik | 2006-02-03 03:12:53 +0000 (Fri, 03 Feb 2006) | 1 line
     Changed paths:
        A /trunk/bar
        A /trunk/foo

     Add foo and bar
     ------------------------------------------------------------------------

i.e.,

     % svn info file:///tmp/repo/branches/test1/foo | grep 'Last Changed Rev'
     Last Changed Rev: 2

     % svn log -q --stop-on-copy file:///tmp/repo/branches/test1/foo
     ------------------------------------------------------------------------
     r3 | nik | 2006-02-03 03:12:56 +0000 (Fri, 03 Feb 2006)
     ------------------------------------------------------------------------

still disagree about the revision in which the file was last changed.

In particular, the output from "svn info" says that the file was last 
changed in a revision (r2) in which it didn't actually exist in the repo.

     % svn cat file:///tmp/repo/branches/test1/foo
     svn: File not found: revision 2, path '/branches/test1/foo'

N

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org