看不到从 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' is not found.
然后我尝试:
svn list -r 67 path/to
和 Subversion 清楚地显示目录中的文件.那么我错过了什么?
我尝试了检查已删除文件的历史记录的答案,但它不是为我工作.
尝试使用 peg 代替操作修订:
svn cat http://server/svn/project/file@67
在您已经提到的SO线程中可以找到删除文件的情况下为什么它起作用的简短答案:><块引用>
当你想查看旧文件时,你真的应该知道区别:
svn cat http://server/svn/project/file -r 1234
和
svn cat http://server/svn/project/file@1234
第一个版本查看现在可用的路径为http://server/svn/project/file 并按原样检索该文件修订版 1234.(因此此语法在文件删除后不起作用).
第二种语法获取可用的文件http://server/svn/project/file 在修订版 1234 中.所以这个语法确实处理已删除的文件.
更长的答案在 SVN 书中:Peg and Operative修订.
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.
这篇关于看不到从 Subversion 存储库中删除的文件的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!