Saturday, March 04, 2006
Moving a Folder Across SVN Repositories
Sometimes we may want to transfer a directory from one subversion repository to another without losing any revision history. This can be dones using svnadmin dump and load with svndumpfilter. The following commands will create the directory /folder/to/move/ in the target repository.
svnadmin dump /path/to/sourcerepo/ | svndumpfilter include /folder/to/move/ > dumpfile svnadmin load /path/to/targetrepo/ < dumpfile
This creates the folder /folder/to/move/ in targetrepo, and there is no simple way (except probably by editing the dumpfile manually) to instruct it to create only the folder /move/.
svndumpfilter does not filter out empty revisions. Hence, one may like to add options --drop-empty-revs --renumber-revs to svnadmin load to drop empty revisions and adjust revision numbers when an empty revision is dropped. More information about administration utilities in svn can be found at the red book.
Oes Tsetnoc | Semangat Mengembalikan Jati Diri Bangsa
Links to this post: