using SVN 1.8.3 with Xcode 5

后端 未结 3 1558
栀梦
栀梦 2020-12-24 10:07

I updated the Subversion client on my system to 1.8.3. I did a checkout of my repository from Xcode 5\'s Source Control menu. Then in terminal

相关标签:
3条回答
  • 2020-12-24 10:28
    1. These are simply two different client applications.
    2. You can set the path to XCode's subversion client by setting XCSubversionToolPath, e.g. (replace with actual svn 1.8 path):

      defaults write com.apple.Xcode XCSubversionToolPath /usr/local/bin/svn
      
    0 讨论(0)
  • 2020-12-24 10:33

    Writing to 'defaults' won't work for Xcode 5. Newer version of Xcode ship with it's own SVN binary located in:

    /Applications/Xcode.app/Contents/Developer/usr/bin/
    

    You need to replace this binary to upgrade Xcode's SVN client to 1.8. Assuming your new SVN client is located in /usr/local/bin/ (default brew install path) type the following in a terminal:

    cd /Applications/Xcode.app/Contents/Developer/usr/bin/
    sudo mv ./svn ./svn.org
    sudo mv ./svnadmin ./svnadmin.org
    sudo mv ./svndumpfilter ./svndumpfilter.org
    sudo mv ./svnlook ./svnlook.org
    sudo mv ./svnrdump ./svnrdump.org
    sudo mv ./svnserve ./svnserve.org
    sudo mv ./svnsync ./svnsync.org
    sudo mv ./svnversion ./svnversion.org
    
    sudo ln -Ff /usr/local/bin/svn svn
    sudo ln -Ff /usr/local/bin/svnadmin svnadmin
    sudo ln -Ff /usr/local/bin/svndumpfilter svndumpfilter
    sudo ln -Ff /usr/local/bin/svnlook svnlook
    sudo ln -Ff /usr/local/bin/svnrdump svnrdump
    sudo ln -Ff /usr/local/bin/svnserve svnserve
    sudo ln -Ff /usr/local/bin/svnsync svnsync
    sudo ln -Ff /usr/local/bin/svnversion svnversion
    

    I did this with Xcode 5.1 and SVN 1.8.8, haven't had any problems at all.

    0 讨论(0)
  • 2020-12-24 10:48

    The above solution ultimately did work for me for Xcode 5.1; I have shortened the code above, feel free to change your directories appropriately (e.g., since I am using MacPorts my svn binaries are in /opt/local/bin):

    export xcode_dir=/Applications/Xcode.app/Contents/Developer/usr/bin
    export svn_files="svn svnadmin svndumpfilter svnlook svnrdump svnserve svnsync svnversion"
    export svn_dir=/opt/local/bin
    for f in $svn_files; do echo "sudo mv -v $xcode_dir/$f $xcode_dir/$f.bak && sudo ln -s $svn_dir/$f $xcode_dir/$f”; done | bash
    

    In addition to this, try deleting your project.xcworkspace if you are running into trouble after updating SVN, and make sure you are running the correct version of Xcode! (I was still running Xcode 5.1 BETA while attempting to validate changes I made to the Xcode.app directory... Stupid mistake but it took me a while to figure out)

    0 讨论(0)
提交回复
热议问题