0

This seems like a it would be pretty simple to do but I have not had any luck finding the answer. I have project with the following structure:

trunk
    src
    Doc
    lib
        external-lib1
        external-lib2

Of course the external-lib1 and external-lib2 are external svn repos. I want to convert this so that the main repo has the exact same file structure but the lib directory contains regular directories. It would be great if the history of the externals cold be preserved but that is not required. The result should look like this:

trunk
    src
    Doc
    lib
        lib1
        lib2
Alex
  • 1,891
  • 3
  • 23
  • 39

2 Answers2

0

The only way to make this change is to create by hand lib-1, lib-2 directories, and make a svn checkout http://link/to/external/library lib-n for every external svn repository you have linked (there isn't a svn switch similar command). This works only if you are able to reach the external repositories. At the end you can cancel the external links.

Another possible way is to make a dump of the repositories (it preserve the history of the repo) and load in your repository.

I think the first way is simple...

Hope that helps

Dave M.
  • 82
  • 9
  • do you have the command or can you point me to the right place in the docs to "dump" and "load" the repositories as described above? – Alex May 03 '16 at 14:10
  • For dump the repository you can do `svnadmin dump /link/to/repos_n > repos_n.dump` and at the end of the dump you can load it into your own repository with `svnadmin load /link/to/repos < /path/to/dump_n.dump`. Try it to a blank folder first. – Dave M. May 04 '16 at 07:29
  • Here are the links: Dump - [http://svnbook.red-bean.com/en/1.7/svn.ref.svnadmin.c.dump.html] and Load - [http://svnbook.red-bean.com/en/1.7/svn.ref.svnadmin.c.load.html] – Dave M. May 05 '16 at 12:53
0

Here is one solution without preserving the history of the externals assuming that you are in Windows:

svn checkout https://<repo>/trunk/lib lib
cd lib
svn propdel svn:externals .
svn commit -m "Removing svn:externals property"
rmdir /s /q lib1\.svn
rmdir /s /q lib2\.svn
svn add * --force
svn commit -m "Adding converted externals"
alongshot
  • 1
  • 1