且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

检查已删除文件的历史记录

更新时间:2023-12-04 22:16:10

要获取已删除文件的日志,请使用

To get the log of a deleted file, use

svn log -r lastrevisionthefileexisted

如果您想恢复文件并保留其版本历史,请使用

If you want to resurrect the file and keep its version history, use

svn copy url/of/file@lastrevisionthefileexisted -r lastrevisionthefileexisted path/to/workingcopy/file

如果您只想要文件内容但没有版本化(例如,为了快速检查),请使用

If you just want the file content but unversioned (e.g., for a quick inspection), use

svn cat url/of/file@lastrevisionthefileexisted -r latrevisionthefileexisted > file

无论如何,不​​要使用svn up"来恢复被删除的文件!

In any case, DO NOT use 'svn up' to get a deleted file back!