Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I migrate an SVN repository to another SVN repository?

Is there a simple way to copy a directory from one repository into another repository with copying all of the history?

like image 778
Jakub Arnold Avatar asked Jun 02 '09 14:06

Jakub Arnold


People also ask

What is SVN migration?

SVN is a popular tool for code hosting. It is used to manage different versions of files like source code, documentation and more. It keeps history and project data. Subversion is an open-source tool and comes under the Apache License.

How do I export and import SVN repository?

In the main menu, select VCS | Browse VCS Repository | Browse Subversion Repository to open the SVN Repositories tool window. Right-click a directory you want to export and choose Export from the context menu. In the Select Path dialog that opens, specify the destination directory and click OK.

How do I clone a SVN repository?

# Clone a repo with standard SVN directory layout (like git clone): git svn clone http://svn.example.com/project --stdlayout --prefix svn/ # Or, if the repo uses a non-standard directory layout: git svn clone http://svn.example.com/project -T tr -b branch -t tag --prefix svn/ # View all branches and tags you have ...


1 Answers

The simplest way is using:

svnadmin dump path/to/repos > repos.out 

This will create a portable format for your repository (with history) in the file repos.out. You can then use

svnadmin load path/to/newrepos < repos.out 

to load your 'dumped' repository to the new or existing one.

Chapter 5. Repository Maintenance -> Migrating Repository Data Elsewhere has this note about using svnadmin dump as of version 1.7:

The Subversion repository dump format describes versioned repository changes only. It will not carry any information about uncommitted transactions, user locks on filesystem paths, repository or server configuration customizations (including hook scripts), and so on.

like image 79
Adam Avatar answered Sep 24 '22 00:09

Adam