简体   繁体   中英

changing to a different SVN repository for a project in XCode 4

I have a project which I regularly commit to an SVN repository named "repo1", for some reason, I needed to change the project's repository location to "repo2" so any future commits/updates will take place to "repo2". Is that possible in XCode 4? if yes, how ?

ps I have SVN server on the local network which has two repos: repo1 & repo2 .

I don't think you can do it with Xcode, but you can use the svn command to relocate the repository URL in your working copy:

svn switch --relocate <from URL> <to URL>

NOTE : always make a backup of your working copy before... ; )

About relocate:

Rewrite working copy URL metadata to reflect a syntactic change only. This is used when repository's root URL changes (such as a scheme or hostname change) but your working copy still reflects the same directory within the same repository.

In your case I would use svanadmin to export/import

export:

svnadmin dump --quiet --revision 0:xxx /home/svn/repo1 > /tmp/repo1.dump

import:

svnadmin load --quiet /home/svn/repo2 < /tmp/repo1.dump

OR use move

svn move https://svn.example.com/repo1/ https://svn.example.com/repo2/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM