Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Merging a part of SVN repository to another repository with history

I have to svn repositories , lets say A and B. I want to add some of the directories of the B into A along with history.Is it possible to do that. To make more clear, following is the scenario.

    repo A                                repo B
       \branches                          \branches 
             \sub-branch1                      \sub-branch B1
              \sub-branch2                      \sub-branch B2 
       \trunk                             \trunk 

What i would like to do is, add sub-branch2 in the branches of repo A. How could do it?

thanks in advance

like image 792
thetna Avatar asked Apr 07 '11 10:04

thetna


People also ask

How do I migrate an svn repository with history to a new Git repository?

Prepare a migration environment. Convert the source SVN repository to a local Git repository. (Optional) Synchronize the local Git repository with any changes from SVN repository while developers continue using SVN. Push the local Git repository to a remote Git repository hosted on Azure Repos.

What is a sync merge svn?

Sync merge is used when you want to fetch all of the latest changes made on your parent branch (e.g. trunk). Using this will keep your feature branch up-to-date with the parent branch.


2 Answers

Get the dump of sub-branch2 of repoB:

  svnadmin dump /location/of/repoB | svndumpfilter include subbranch2 > my.dump

Merge the dump into branches of repoA:

  svnadmin load /location/of/repoA --parent-dir branches < my.dump
like image 108
vpk Avatar answered Sep 29 '22 21:09

vpk


Yes, this is possible. You need to use svnadmin dump and svnadmin load.
For more info, look here: http://blogs.nuxeo.com/dev/2006/04/dump-load-svn-repositories-using-svnadmin-svndumpfilter.html

like image 20
Daniel Hilgarth Avatar answered Sep 29 '22 22:09

Daniel Hilgarth