简体   繁体   中英

svn command line: how can I get a file from history?

I know svn can get log of history, eg

$ 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?

basically you can always get the item by adding an "@" and the revision to the complete URL: Example:

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. If you want to copy it into an existing working copy (usecase: revive already deleted items), you should use copy , to preserve Version history

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM