Reputation: 40593
I would like to obtain all the versions of a given file in my SVN repository. For instance, let's say that the file ThirdPartyAssembly.dll was checked 3 times, is there a command that will get me all the version on my HD (e.g. ThirdPartyAssembly.dll.v1, ThirdPartyAssembly.dll.v2, ThirdPartyAssembly.dll.v3, etc.)?
Thanks!
Upvotes: 0
Views: 142
Reputation: 255005
there is no command out of the box but you can build simple script that uses log -q
command output.
zerkms@honeypot /var/www/cv $ svn log -q index.html
------------------------------------------------------------------------
r17 | zerkms | 2010-04-21 21:47:16 +1100 (Wed, 21 Apr 2010)
------------------------------------------------------------------------
r16 | zerkms | 2010-04-21 21:37:03 +1100 (Wed, 21 Apr 2010)
------------------------------------------------------------------------
r15 | zerkms | 2010-04-21 21:36:46 +1100 (Wed, 21 Apr 2010)
------------------------------------------------------------------------
r14 | zerkms | 2010-04-21 21:32:37 +1100 (Wed, 21 Apr 2010)
... etc
so you just need to parse first column in your favorite scripting language
after this just do:
svn copy http://server/full/path/to/file@14 file.rev.14
etc, for each revision and you will get bunch of file.rev.XX
Upvotes: 2
Reputation: 34417
Right click with mouse on the selected file ThirdPartyAssembly.dll in your working copy on your HD, and a popup menu appears.
From the popup menu choose on TortoiseSVN > Show log, and a window appears
The window contains the list of ALL the checked in versions of your file
RIGHT click mouse on the one that you want, a pop up menu appears.
Form the popup menu choose "Save revision to..." and you can save it on your HD wherever you like.
Upvotes: 2
Reputation: 134207
You could just run a diff command on each version to get CVS to generate copies of the old files. You could probably even script this if there are a lot of old revisions.
But that said, what exactly are you really trying to do here? Maybe there is a better way?
Upvotes: 0