看不到从 Subversion 存储库中删除的文件的内容

Can't see contents of a file deleted from Subversion repository

前一段时间我从 Subversion 存储库中删除了一个文件,现在我想看看它的内容。我确定该文件在修订版 68 中被删除,因此我尝试了以下操作:

svn cat -r 67 path/to/file

从项目根目录,svn 告诉我 svn: E155010: The node '/absolute/path/to/file' was not found. 然后我试了:

 svn list -r 67 path/to

并且 Subversion 清楚地显示了目录中的文件。那我错过了什么?

我尝试了 examining history of deleted file 的答案,但它对我不起作用。

尝试使用挂钩代替手术修订:

svn cat http://server/svn/project/file@67

简短回答为什么它可以在您已经提到的 SO thread 中找到的已删除文件的情况下工作:

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.

更长的答案在 SVN 书中:Peg and Operative Revisions