Thursday, February 18, 2010

How to svnsync on Windows?

One of the most powerful tool in subversion is the ability to transfer repository from one server to another.

That tool is called svnsync. There are some documentations around but not much tutorial.

Let's pretend that your project's source code is currently hosted at https://svn.old.com and wanted it to transfer at https://svn.new.com.

So, how do we migrate the source code? Simple. First, install Slik-Subversion from Slik-SVN.com. Now, follow the next procedure.
  1. Run a Command Prompt
  2. Type-in: svnsync initialize https://svn.new.com https://svn.old.com/trunk/
  3. Then type-in: svnsync synchronize --source-username mynewsvn_usr --source-password mynewsvn_pwd --sync-username myoldsvn_usr --sync-password myoldsvn_pwd https://svn.new.com
Viola! You are done!

Of course, you will have to edit the following to apply on your situation.
  1. mynewsvn_usr to your real username at your https://svn.new.com site
  2. mynewsvn_pwd to your real password at your https://svn.new.com site
  3. myoldsvn_usr to your real username at your https://svn.old.com site
  4. myoldsvn_pwd to your real password at your https://svn.old.com site
Not to mention, change:
  1. https://svn.old.com to your real old project repository
  2. https://svn.new.com to your real new project repository
Enjoy migrating!

1 comment:

Anonymous said...

Command 3) should be like this:

svnsync synchronize --source-username myoldsvn_usr --source-password myoldsvn_pwd --sync-username mynewsvn_usr --sync-password mynewsvn_pwd https://svn.new.com