views:

992

answers:

4

Hi,

I've had subversion running in Xcode for a while. The integration of subversion has always hung by a thread. However my subversion server has changed its ip address ... and my xcode project still tries to look up the source on the old ip.

I have changed the ip of the subversion server via the SCM menu in xcode ... however these changes don't seem to effect the project.

Anyone got any idea how I change the subversion ip in the project?

Cheers Rich

+3  A: 

It's not Xcode, it's svn itself that still looks to the old reposotory. Try firing up a terminal, and cd'ing into the project directory. There use the switch svn command:

svn switch NewURL

then refresh or close/open the Xcode project.

IlDan
I think this is probably the answer however when i try it i get the followingsvn switch https://[email protected]:8443/svn/iphonesvn: 'https://[email protected]:8443/svn/iphone'is not the same repository as'https://[email protected]:8443/svn/iphone'any idea what I'm doing wrong?
Rich
i don't think switching will work as my repositry has been updated ...
Rich
Well, you can't ask us so much as your exact URL repository... ;) So, you may just check out a new project tree with Xcode or with 'svn co URL NewProject' and copy any new code you left on the old tree to the new one. Then delete the old tree. Double check before deleting.
IlDan
A: 

Try creating a new SCM repository and setting your project to the new one, and if that works, you can safely delete the old one.

Jasarien
can you explain how you 'set the project to the new one'?
Rich
Sure!You can create a new repository in the "Configure SCM Repositories..." menu item under SCM in Xcode. Once you've created a new repo, go to SCM > Configure SCM For This Project...In the new window that appears, towards the bottom should be a drop down menu labelled "SCM Repository" choose the new one you just created in this drop down and see if that works.
Jasarien
ah .. i don't seem to have the 'Configure SCM for this project'. Maybe one a project is bound to SCM that option disappears ...
Rich
Interesting. You should be able to reach the same config window by choosing Project > Edit Project Settings from within XCode.
Jasarien
managed to find the option ... however it still refers to the old ip :(
Rich
Then, I'm sorry, but I don't know what else to suggest. There are many knowledgeable people on this site, I'm sure someone will come up with the answer soon enough.
Jasarien
+2  A: 

You need to use the --relocate option for the svn switch command if you are just changing hostnames or ip addresses.

So, something like this:

svn sw --relocate svn://[email protected]/mypath svn://[email protected]/mypath

Brian Stormont
A: 

I had similar problems when the dns name for my svn server changed (but keeping the same IP)

svn sw --relocate worked for me (from terminal on a mac). After the change, go to "Refresh entire project" from the SCM menu in xcode.

Good idea to do an svn info first though to check your repo URL. On my first attempt I entered the wrong FROM URL and the svn sw --relocate just does nothing, with no error reported.

The confusing thing in xcode was the the SCM - repositories browser worked fine after I updated the svn settings in xcode preferences, but my project was not fixed until after the --relocate business.

Brynjar