I have the following SVN structure:
ExistingRepository1
ExistingRepository2
So I already read this question: How do I move a single folder from one Subversion repository to another repository? But in my case ExistingRepository2 already exists. So how can I do it? I want to have all revisions in the new project.
I have for example the revision number 1000 in ExistingRepository1 -> MyFolder -> FolderToMove
, but in the ExistingRepository1
there is already a revision with number 1000. So, what will the svn load
do? Will it automatically move the revision numbers?
These would be the commands:
svnadmin dump /svn/ExistingRepository1 > ./repository.dump
svndumpfilter include MyFolder/FolderToMove --drop-empty-revs --renumber-revs --preserve-revprops < ./repository.dump > ./folderToMove_only.dump
svnadmin load /svn/ExistingRepository2 < ./folderToMove_only.dump
Thank you in advance for your help, Best Regards, Tim.
Here is somebody who claims to have moved a directory across existing repositories (with some blog comments that indicate success). Apparently it creates the whole path in the destination repository, but I imagine that once the directory is in the destination repository you can easily move it to where you want it (while maintaining its history).
[Edit]
I successfully tested this. Here are the commands I used:
svnadmin dump /path/to/source/repo | svndumpfilter --drop-empty-revs --renumber-revs include /folder/to/transfer/ > dumpfile
svnadmin load /path/to/destination/repo < dumpfile
I then moved the transferred file (using TortoiseSVN's Repo-browser).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With