How do I dump one project out of an SVN repository which contains multiple projects?

前端 未结 2 651
野的像风
野的像风 2020-12-04 15:43

I am working with an SVN repository with many projects. I need to move a few of the projects out of that repository into individual repositories, one for each project, keepi

相关标签:
2条回答
  • 2020-12-04 16:01

    Just an small addition to @Avi answer and @Kit comment.

    If you use svndumpfilter, you may lose a commit that is necessary for loading the repository (source).

    In my case:

    cat dump | svndumpfilter --drop-empty-revs --renumber-revs include trunk/project > project.dump 
    svnadmin load --ignore-uuid /opt/svn/newlocation < project.dump
    <<< Started new transaction, based on original revision 1 
    svnadmin: File not found: transaction '0-0', path 'trunk/project'
    

    The solution was to commit an upper directory trunk first.

    0 讨论(0)
  • 2020-12-04 16:14

    You can use the svndumpfilter utility to do this. The SVN book has a good explanation of how to do this.

    For instance, one way would be:

    
    $ svnadmin dump /path/to/repo 
         | svndumpfilter include /proj > dump-file
    $ svnadmin create /new/proj/repo
    $ svnadmin load --ignore-uuid /new/proj/repo < dump-file
    $ svn rm file:///path/to/repo/proj
    
    0 讨论(0)
提交回复
热议问题