Upgrade Subversion on Mac OS X

本文介绍如何解决Subversion客户端过旧无法使用的问题,包括检查当前版本、下载安装最新客户端、配置环境变量等步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

If you get the following error

svn: This client is too old to work with working copy '.';
please get a newer Subversion client

... or you just want to update your subversion client (command line), try the following:

  1. In Terminal, type "svn --version" to find out what version you currently have
  2. Go to http://www.open.collab.net/downloads/community and download the latest client for OS X and install it. This will install the new svn into /opt/subversion/bin
  3. Got to your terminal and check your $PATH by typing "echo $PATH". If you don't see /opt/subversion/bin in there, make sure you add it by typing export PATH=/opt/subversion/bin:$PATH. If it DOES exist and appears AFTER /usr/bin, then you may need to remove an older copy of svn that came installed on OS X. To do so, go to /usr/bin and remove all files starting with svn. This isn't an exact science but it should do the trick.
  4. To be able to call the Subversion commands from every directory, you must add it to your path in the ".profile" or .bash_profile. If you don't know what that means, don't worry. Just follow the instructions.

    Open the Terminal application. It can be found in the /Applications/Utilities folder. Whenever you see below a line starting with a dollar sign, you should type the text after the dollar sign in your terminal and hit return.

    Start by creating a new text file called '.bash_profile' in "~/" directory, i.e. with the command line text editor pico:

    $ handy .profile

    Add the following line to the .profile file:

    export PATH=/opt/subversion/bin/:$PATH

    Now hit Control-X, then confirm saving the file with 'y', followed by return.

    You have just added Subversions's location to your path. Let Terminal read this file to know the path has changed (there's an empty space between the dots):

    $ . .profile or . ./.profile*
    (Step 4 referent from: http://www.rubyrobot.org/tutorial/subversion-with-mac-os-x)
  5. Type "svn --version". You should see that you have the newest version installed!

NOTE: If /opt/subversion/bin already exists, it will be backed up to /opt/subversion_backup.MMDDYYHHMMSSS. See the readme for more information.

*See http://www.tech-recipes.com/rx/2621/os_x_change_path_environment_variable/ for a great explanation of this

 

Quote from : http://www.redfinsolutions.com/redfin-blog/update-subversion-mac-os-x

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值