Google apps
Main menu

How do I import an existing Subversion repository?

To upload the history of an existing Subversion repository, use the svnsync tool that ships with Subversion 1.4. Run svnsync help to read more about this tool.

Note that your Google Code repository must be reset to revision 0 for this to work. If your project is newly created, it will be at revision 1, and your project's Source tab will display instructions on how to reset the repository yourself.(Note: you must be a project owner to reset your own repository, and also to push code up with svnsync.)

If your repository's latest revision is greater than 1, then a site administrator will have to reset the repository for you; email and ask for this.

Here's a sample transcript that demonstrates how you can push history from an existing repository (located at file:///my/repos) to your repository on Google Code:

        $ svnsync init --username YOURUSERNAME file:///path/to/localrepos
        Copied properties for revision 0.
        $ svnsync sync --username YOURUSERNAME
        Committed revision 1.
        Copied properties for revision 1.
        Committed revision 2.
        Copied properties for revision 2.
When prompted for your password, use your password, which can be found on your settings page.

Running svnsync on a large repository will take a significant amount of time. If you are disconnected during the process, you may see the error message "svnsync: Couldn't get lock on destination repos after 10 attempts". If this happens, you can remove the lock yourself, see the "Locks" section of svnsync.txt.