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

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, keeping the history.

I’ve been able to use svnadmin dump to dump the entire repository and svnadmin load it into another repository, but I can’t find a way of dumping only one project from the original repository so I can load it into the new one. Is this possible? If so how?

  • adding user defined libraries to SVN
  • Prevent commiting files to SVN with warnings using eclipse
  • Access to '/svn/ctm/!svn/me' forbidden When commit to svn server?
  • composer removes diectories in web/bundles
  • Jira Subversion Mirror / SubGit remote error on push
  • Export a local git
  • Switch the svn branch git dcommits to
  • How do I import svn branches rooted in different directories into git using git-svn?
  • Handling conflicts in SVN with Tortoise?
  • Tortoise SVN Making a past revision the new Head
  • Passing parameters to SVN in a PowerShell script
  • Command line to list all merge(copies) in subversion?
  • 2 Solutions collect form web for “How do I dump one project out of an SVN repository which contains multiple projects?”

    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

    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.

    Git Baby is a git and github fan, let's start git clone.