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.

15 thoughts on “Subversion: What to do when your repository server moves to another ip?

  1. Bill Karwin

    Good one! I’ve used a comparable solution in the past to edit CVS control files manually.

    You might want to add “grep ‘/\.svn/'” into the pipeline before xargs, to prevent editing a normal file that happens to be named “entries”.

  2. Vee

    Shoulda used DNS, that’s why it was invented ๐Ÿ™‚

    But yea, “svn switch” would do it.

  3. Sunny Walia Post author

    Andrew: good point. I don’t use svn info enough to remember it when I need it. Thanks for your comment.

    Antonio: ๐Ÿ™‚ Thanks for the comment.

  4. dior sunglasses

    My wife and i ended up being now thankful that Ervin managed to do his reports through the precious recommendations he had from your site. It is now and again perplexing to simply always be releasing things that other people may have been trying to sell. We really see we have got the website owner to give thanks to for that. All of the illustrations you made, the simple web site menu, the relationships you can help engender – it is mostly sensational, and it’s really helping our son in addition to our family reason why that article is enjoyable, which is highly indispensable. Thank you for the whole thing!

  5. moncler jacket

    I simply had to say thanks once again. I do not know what I might have sorted out in the absence of the type of smart ideas shown by you regarding that situation. This was a very frustrating setting in my circumstances, however , taking a look at a new specialised mode you managed the issue forced me to jump over joy. Now i am happier for the support as well as expect you are aware of an amazing job that you are providing teaching some other people using a blog. Most probably you’ve never come across any of us.

  6. links of london

    I and also my pals ended up looking through the nice pointers from your website and so suddenly came up with a terrible feeling I had not expressed respect to the web site owner for those techniques. Most of the young men came passionate to study all of them and now have quite simply been taking advantage of them. Appreciation for genuinely very accommodating and also for pick out this sort of useful things most people are really needing to be informed on. Our own sincere apologies for not expressing appreciation to you earlier.

  7. ferragamo belt

    My husband and i felt very comfortable that Chris could complete his inquiry with the ideas he obtained from your very own web site. It’s not at all simplistic to just possibly be giving freely ideas the rest have been selling. We really realize we have you to give thanks to for this. The most important illustrations you made, the straightforward site navigation, the friendships you assist to engender – it’s got everything incredible, and it’s really letting our son and our family imagine that this topic is satisfying, which is certainly especially essential. Thanks for everything!

  8. puma shoes

    I am just commenting to make you know of the useful encounter my friend’s daughter encountered going through your web site. She came to understand a lot of details, which include what it is like to have an awesome giving style to let many more without problems understand selected tricky subject areas. You truly exceeded readers’ expected results. Thanks for providing those insightful, trusted, edifying and in addition unique tips on this topic to Tanya.

Leave a Reply

Your email address will not be published. Required fields are marked *