> From: Ryan Schmidt [mailto:subversion-20...@ryandesign.com]
> 
> Certainly not if you use an operative revision. You would need to use a
peg
> revision for that. The book explains the difference between the two.
> 
> http://svnbook.red-bean.com/nightly/en/svn.advanced.pegrevs.html

This does explain something I didn't already know ... but it seems to just
clarify and add credibility to Paul's original question.  He wants to see
the history, including the rev where the file was deleted.  Now that I'm
using the correct operative & peg revisions ... I can see the history of a
file, including all the modifications etc, but cannot get the rev where it
was deleted.

Complete details follow, but this is the relevant part.  A file named foo
was deleted in rev 4.  It seems, if I svn log f...@3, and I specify -r
0:head, then I should get the complete history of that file, even for revs
higher than 3.

[u...@machine wc]# svn log -v -r 0:head file://${HOME}/trash/repo/f...@3
svn: File not found: revision 4, path '/foo'
[u...@machine wc]# svn log -v -r 0:3 file://${HOME}/trash/repo/f...@3
------------------------------------------------------------------------
r1 | root | 2010-11-27 08:12:20 -0500 (Sat, 27 Nov 2010) | 1 line
Changed paths:
   A /foo

added
[ *snip*]


Here are the complete details:

[u...@machine ~]# mkdir $HOME/trash
[u...@machine ~]# cd $HOME/trash
[u...@machine trash]# mkdir repo
[u...@machine trash]# svnadmin create repo
[u...@machine trash]# mkdir wc
[u...@machine trash]# svn co file://${HOME}/trash/repo wc
Checked out revision 0.
[u...@machine trash]# cd wc
[u...@machine wc]# touch foo
[u...@machine wc]# svn add foo
A         foo
[u...@machine wc]# svn commit -m 'added' foo
Adding         foo
Transmitting file data .
Committed revision 1.
[u...@machine wc]# echo "a" > foo
[u...@machine wc]# svn commit -m 'changed a' foo
Sending        foo
Transmitting file data .
Committed revision 2.
[u...@machine wc]# echo "b" > foo
[u...@machine wc]# svn commit -m 'changed b' foo
Sending        foo
Transmitting file data .
Committed revision 3.
[u...@machine wc]# svn rm foo
D         foo
[u...@machine wc]# svn commit -m 'deleted' foo
Deleting       foo

Committed revision 4.
[u...@machine wc]# svn log -v f...@2
svn: 'foo' is not under version control
[u...@machine wc]# svn log -v file://${HOME}/trash/repo/f...@2
------------------------------------------------------------------------
r2 | root | 2010-11-27 08:12:32 -0500 (Sat, 27 Nov 2010) | 1 line
Changed paths:
   M /foo

changed a
------------------------------------------------------------------------
r1 | root | 2010-11-27 08:12:20 -0500 (Sat, 27 Nov 2010) | 1 line
Changed paths:
   A /foo

added
------------------------------------------------------------------------
[u...@machine wc]# svn log -v file://${HOME}/trash/repo/f...@3
------------------------------------------------------------------------
r3 | root | 2010-11-27 08:12:45 -0500 (Sat, 27 Nov 2010) | 1 line
Changed paths:
   M /foo

changed b
------------------------------------------------------------------------
r2 | root | 2010-11-27 08:12:32 -0500 (Sat, 27 Nov 2010) | 1 line
Changed paths:
   M /foo

changed a
------------------------------------------------------------------------
r1 | root | 2010-11-27 08:12:20 -0500 (Sat, 27 Nov 2010) | 1 line
Changed paths:
   A /foo

added
------------------------------------------------------------------------
[u...@machine wc]# svn log -v file://${HOME}/trash/repo/f...@4
svn: File not found: revision 4, path '/foo'
[u...@machine wc]# svn log -v -r 0:head file://${HOME}/trash/repo/f...@3
svn: File not found: revision 4, path '/foo'
[u...@machine wc]# svn log -v -r 0:3 file://${HOME}/trash/repo/f...@3
------------------------------------------------------------------------
r1 | root | 2010-11-27 08:12:20 -0500 (Sat, 27 Nov 2010) | 1 line
Changed paths:
   A /foo

added
------------------------------------------------------------------------
r2 | root | 2010-11-27 08:12:32 -0500 (Sat, 27 Nov 2010) | 1 line
Changed paths:
   M /foo

changed a
------------------------------------------------------------------------
r3 | root | 2010-11-27 08:12:45 -0500 (Sat, 27 Nov 2010) | 1 line
Changed paths:
   M /foo

changed b
------------------------------------------------------------------------


Reply via email to