Merging two SVN directories in two different repositories
I have a repository R1 with this configuration:
R1
|-- P11
|--D11
|--D12
|--D13
file1
file2
...
There is another global repository R2 in which I can access directory U1
R2
|-- U1
|-- P21
|...
I do not have access to R2 directly, only to my directories.
I would like to copy P11 and its svn h开发者_C百科istory into P21...
Is it possible to do that?
Best regards.
It should be something like this:
svnadmin dump /path/to/repo/R1 > R1-dumpfile
svndumpfilter include P11 < R1-dumpfile > P11-dumpfile
svnadmin load /path/to/repo/R2 --parent-dir U1/P21 < P11-dumpfile
( you can of course pipe the commands, but leaving them separate for the sake of understanding )
Untested, but it should get you going.
Reference : http://svnbook.red-bean.com/en/1.5/svn.reposadmin.maint.html
You want rsvndump which will dump a remote repository. Pipe it through svndumpfilter to get the directory you want, then modify its path using sed; or specify the url you want and use the --prefix option to rsvndump. Then svnload the modified dumpfile into your repository.
There's guides on the web for all of the above.
精彩评论