A while ago I deleted a file from Subversion repository and now I want to take a look at its contents. I determined that the file was deleted in revision 68, so I tried the following:
svn cat -r 67 path/to/file
from the project root directory, svn tells me that svn: E155010: The node '/absolute/path/to/file' was not found.
Then I tried:
svn list -r 67 path/to
and Subversion clearly shows the file in the directory. So what am I missing?
I tried the answer from examining history of deleted file and it isn't working for me.
Try using peg instead operative revision:
svn cat http://server/svn/project/file@67
Short answer why it works in case of deleted files you can find in SO thread you have already mentioned:
When you want to look at old files you really should know the difference between:
svn cat http://server/svn/project/file -r 1234
and
svn cat http://server/svn/project/file@1234
The first version looks at the path that is now available as http://server/svn/project/file and retrieves that file as it was in revision 1234. (So this syntax does not work after a file delete).
The second syntax gets the file that was available as http://server/svn/project/file in revision 1234. So this syntax DOES work on deleted files.
Longer answer is in the SVN book: Peg and Operative Revisions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With