0

I've had to do some server maintenance on our SVN Master server, this involved changing IP address.

I used the following command to relocate the repository:

svn switch --relocate http://ec2-zz-zzz-zz-zz.eu-west-1.compute.amazonaws.com/svn/svn.xxxxxxxxxxxxx.com http://ec2-yy-yyy-yyy-y.eu-west-1.compute.amazonaws.com/svn/svn.xxxxxxxxxxxxx.com

where zz-zzz-zz-zz is the old IP address and yy-yyy-yyy-y is the new IP address.

The problem I'm having now is that all the external files are pointing the old IP address and I'm not sure how to change them.

How do I change the IP address of the external files ?

Any help appreciated.

EDIT This command:

svn propget svn:externals

outputs the following:

imgs http://ec2-zz-zzz-zz-zz.eu-west-1.compute.amazonaws.com/svn/svn.xxxxxxxxxxxxx.com/website-files/www.xxxxxxxxxxxxx.com/imgs

So I know that imgs is setup as an external folder. So I just need to edit this property to change the IP address.

I'm guessing I need the following command:

svn propedit svn:externals

but I'm not sure of the exactly how to format the command.

Stephen
  • 4,715
  • 8
  • 53
  • 78
  • 2
    It would make things easier to change them to relative externals rather than absolute externals. That way, you're only going to have to make the change once. – Nick Jun 12 '13 at 09:11
  • @Nick, I was just reading about that and it seems like the best solution but how do I go about updating them to the relative paths. – Stephen Jun 12 '13 at 09:13
  • @Stephen - Not sure of what the question is. The procedures to create and edit a property are obviously the same. Are you asking for a way to do batch search and replace? – Álvaro González Jun 12 '13 at 09:20
  • possible duplicate of [How to migrate all URLs in svn:externals properties across a repository?](http://stackoverflow.com/questions/204616/how-to-migrate-all-urls-in-svnexternals-properties-across-a-repository) – Nick Jun 12 '13 at 09:21
  • @ÁlvaroG.Vicario No, I want to know how to edit the property. I'll update my question now with a bit more detail. – Stephen Jun 12 '13 at 09:23
  • Have a look at the link above - in particular this answer: http://stackoverflow.com/a/3526100/516138 – Nick Jun 12 '13 at 09:23
  • It seems there isn't an "easy" way.. This article gives a fairly good example of how to do it with a pyton wrapper for svn-dump that allows execution of `replace-prop` on a whole dump (repo). As @Stephen suggests use should start using relative external URLs. http://bigbucketsoftware.com/2007/11/10/migrating-subversion-externals/ – marekful Jun 12 '13 at 09:23
  • How would I remove the external reference and just check the folder out as normal. This would get me around the problem for now and allow people to continue working. – Stephen Jun 12 '13 at 09:43
  • If you're running a long-running service on Amazon EC2 like this then you will make your life much easier in the long run if you use an "elastic IP" so you can keep the same IP address for your instance across reboots. Failing that, use a service like [NoIP](http://www.noip.com/free/) or use a CNAME in your own domain to create a fixed name you can remap to whatever address your EC2 instance has at a given time. – Ian Roberts Jun 12 '13 at 10:15
  • Thanks @IanRoberts, if only I had of been talking to you yesterday, I had to find that out the hard way. Yes, I do have Elastic IP's setup now. So I wont have this problem again in the future. – Stephen Jun 12 '13 at 15:40

1 Answers1

0

Ok, I managed to solve the problem. The issue was actual that SVN_EDITOR was not set up. So I to set it up I used the following command:

export SVN_EDITOR=nano

and then I was able to edit the reference using the following command:

svn propedit svn:externals .
Stephen
  • 4,715
  • 8
  • 53
  • 78