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

Re: How to find out the rev number where a file was deleted?

From: Les Mikesell <lesmikesell_at_gmail.com>
Date: Sat, 27 Nov 2010 11:07:30 -0600

On 11/27/10 7:31 AM, Edward Ned Harvey wrote:
>> From: Edward Ned Harvey [mailto:svn_at_nedharvey.com]
>>
>> Complete details follow, but this is the relevant part. A file named foo
>> was deleted in rev 4. It seems, if I svn log foo_at_3, and I specify -r
>> 0:head, then I should get the complete history of that file, even for revs
>> higher than 3.
>
> Now this is effed up. :-) It works if I resurrect the file, but only if I
> resurrect it with the same name as before.
>
> [root_at_FILER wc]# svn cp file://${HOME}/trash/repo/foo_at_3 goo
> A goo
> [root_at_FILER wc]# svn commit -m 'resurected and renamed'
> Adding goo
>
> Committed revision 5.
> [root_at_FILER wc]# svn log goo
> ------------------------------------------------------------------------
> r5 | root | 2010-11-27 08:27:33 -0500 (Sat, 27 Nov 2010) | 1 line
>
> resurected and renamed
> ------------------------------------------------------------------------
> r3 | root | 2010-11-27 08:12:45 -0500 (Sat, 27 Nov 2010) | 1 line
>
> changed b
> ------------------------------------------------------------------------
> r2 | root | 2010-11-27 08:12:32 -0500 (Sat, 27 Nov 2010) | 1 line
>
> changed a
> ------------------------------------------------------------------------
> r1 | root | 2010-11-27 08:12:20 -0500 (Sat, 27 Nov 2010) | 1 line
>
> added
> ------------------------------------------------------------------------
>
>
> [root_at_FILER wc]# svn log -r 0:head file://${HOME}/trash/repo/foo_at_3
> svn: File not found: revision 5, path '/foo'
> [root_at_FILER wc]# svn mv goo foo
> A foo
> D goo
> [root_at_FILER wc]# svn commit -m 'renamed back to original'
> Adding foo
> Deleting goo
>
> Committed revision 6.
>
>
> [root_at_FILER wc]# svn log -r 0:head file://${HOME}/trash/repo/foo_at_3
> ------------------------------------------------------------------------
> r1 | root | 2010-11-27 08:12:20 -0500 (Sat, 27 Nov 2010) | 1 line
>
> added
> ------------------------------------------------------------------------
> r2 | root | 2010-11-27 08:12:32 -0500 (Sat, 27 Nov 2010) | 1 line
>
> changed a
> ------------------------------------------------------------------------
> r3 | root | 2010-11-27 08:12:45 -0500 (Sat, 27 Nov 2010) | 1 line
>
> changed b
> ------------------------------------------------------------------------
> r5 | root | 2010-11-27 08:27:33 -0500 (Sat, 27 Nov 2010) | 1 line
>
> resurected and renamed
> ------------------------------------------------------------------------
> r6 | root | 2010-11-27 08:28:44 -0500 (Sat, 27 Nov 2010) | 1 line
>
> renamed back to original
> ------------------------------------------------------------------------

I think a delete doesn't appear in a file's history - the file just no longer
appears in subsequent revisions. However a delete is a change in the containing
directory. Does 'svn log -v' on the directory above show the changes in the way
they happened?

-- 
   Les Mikesell
    lesmikesell_at_gmail.com
Received on 2010-11-27 18:08:15 CET

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.