LAMP On Focus

Icon

PHP, MySQL, Linux practical usage.

Subverion : Check out files affected during a specific commit revision

I am using SVN for my code management, and recently I needed to get only the files that where commited on a particular version. Looking around there was no straight way of doing this. But, this can be achived by the following steps.,
Get the list of files commited on a particular revision number.
svn log </local/svn/checkout/path/> -qv -r<revision_number> | awk '/\//{print $2}'

 svn log /home/raja/coderepo/ -qv -r12423 | awk '/\//{print $2}' 

Export the files one by one by specifying the filename & revision number explicitly.
svn export -r<revision_number> <repository_url> <target_directory>/<file_name>

 svn export -r12423 http://svn.rajavarma.com/trunk/ /home/raja/svndump/r12423/myfile.php 

Have wrapped the process in a simple PHP script which you can download svn.export.revision.files.php here.

Calendar

March 2010
M T W T F S S
« Feb    
1234567
891011121314
15161718192021
22232425262728
293031  

Bookmarks

  • No bookmarks avaliable.

Friend Connect