[英]svn command line: how can I get a file from history?
I know svn can get log of history, eg 我知道svn可以获取历史记录,例如
$ svn log -v -r32 http://svn.red-bean.com/repos/test/
------------------------------------------------------------------------
r32 | sally | 2003-01-13 00:43:13 -0600 (Mon, 13 Jan 2003) | 1 line
Changed paths:
M /a.dll
...
But how can I get that dll? 但是,我该如何获取该dll?
basically you can always get the item by adding an "@" and the revision to the complete URL: Example: 基本上,您总是可以通过在完整的URL上添加“ @”和修订来获得商品:示例:
svn export http://svn.red-bean.com/repos/test/a.dll@r32 ./a.dll
Note that you need export
if you want to copy this file/directory to a arbitrary filedestination. 请注意,如果要将此文件/目录复制到任意文件目的地,则需要
export
。 If you want to copy it into an existing working copy (usecase: revive already deleted items), you should use copy
, to preserve Version history 如果要将其复制到现有的工作副本中(用例:恢复已删除的项目),则应使用
copy
来保留版本历史记录
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.