Tag Archives: Find

Subversion: What to do when your repository server moves to another ip?

This weekend our networking guys decided to change ips for all of our servers. They also changed our subversion server’s ip. This caused some issues in the subversion world with developers who had checkouts pointing to ips instead of hostname, using command similar to:

svn co svn+ssh:// /home/mycheckout/

Now when they do “svn update” inside the their /home/mycheckout/ directory, they get an error:

We needed to point the checkout to the new ip. Easiest way to do this is to delete your checkout and re-checkout. Unfortunately, some of the developers had a lot of modified files which wasn’t checked in yet. I fixed it by issuing:

find /home/mycheckout -name "entries"|xargs /usr/bin/perl -w -i -p -e "s/"

Find command helps us in finding all the files with name “entries” and xargs takes the filename and passes it to perl. To understand what perl command is doing, see this post.

Another method which may be preferred as mentioned in comments is: svn switch Only downside I see with this is that you have to remember what you used originally. If you did checkout as [email protected], you would have to pass that to the command below.

Syntax is:

svn switch --relocate svn+ssh:// svn+ssh://

I would suggest at this time you switch to using hostname instead of ip.