svn 命令行:如何从历史记录中获取文件?
svn command line: how can I get a file from history?
我知道 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
...
但是我怎样才能得到那个 dll?
基本上,您总是可以通过添加“@”和对完整版本的修订来获得该项目 URL:
示例:
svn export http://svn.red-bean.com/repos/test/a.dll@r32 ./a.dll
请注意,如果您想将此 file/directory 复制到任意文件目的地,则需要 export
。如果你想将它复制到现有的工作副本中(用例:恢复已删除的项目),你应该使用 copy
,以保留版本历史记录
我知道 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
...
但是我怎样才能得到那个 dll?
基本上,您总是可以通过添加“@”和对完整版本的修订来获得该项目 URL: 示例:
svn export http://svn.red-bean.com/repos/test/a.dll@r32 ./a.dll
请注意,如果您想将此 file/directory 复制到任意文件目的地,则需要 export
。如果你想将它复制到现有的工作副本中(用例:恢复已删除的项目),你应该使用 copy
,以保留版本历史记录