svnrepositorytortoisesvnwindows-7-x64visualsvn-server

SVN: migrate-copy external folder into own project directory, keep and link history


I have this svn structure:

project1 \ tags
         \ trunk \ ... \ libraries \ lib1
                                   \ lib2
         \ branch

project2 \ tags
         \ trunk \ .. \ external_folder = trunk(project1) \ .. \ libraries \ lib1
                                                                           \ lib2
         \ branch

Someday I have used in project1 some libraries like STM32 or FAT Filesystem. Instead of creating an own project called "external libs" and using SVN:externals, I let them stay and used them in an external folder via SVN:externals in project2. Now some time has passed and I want to "clean up" my repository.

Is there a way to migrate-copy this external folder into an "external libs" project while keeping the history?

The desired structure is shown below:

external_libs \ lib1 \ tags
                     \ trunk
                     \ branch

              \ lib2 \ tags
                     \ trunk
                     \ branch

project1 \ tags
         \ trunk \ ... \ libraries (extern) \ lib1
                                            \ lib2
         \ branch

Incidentally, I use Windows 7 as operating system and TortoiseSVN and VisualSVN server.


Solution

  • Unrelated

    For external_libs repo I'll suggest to use inverted hierarchy

    /(trunk|branches|tags)/(lib1|lib2|...|libN)

    Short answer

    Yes, keeping history of changes in lib* in new repository is possible

    Longer answer

    You can move data and all related revisions of \ libraries\lib* into new repository, but it will require to use tools outside of TortoiseSVN. Namely: you must to create dump of repository-part (svnadmin dump ...| svndumpfilter ... or just svnrdump dump URL) and loading this dump (svnadmin load --ignore-uuid --parent-dir ...) into new repository. After load you have to change all externals definition in project1