mac os更新SVN版本方法

 
 
Follow below instructions to install svn 1.8 on OSX Yosemite 10.10/xcode6 install which comes with svn 1.7.17
 
Open Terminal:
 
sudo -s
 
#
# create link to toolchain
#
ln -s /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/ /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.10.xctoolchain
 
 
#
# download and decompress
#
cd ~/Downloads/
curl -o subversion-1.8.9.tar.gz http://archive.apache.org/dist/subversion/subversion-1.8.9.tar.gz
tar -xvf subversion-1.8.9.tar.gz
 
#
# compile it... see NOTE below if you are having issues with serf
#
cd ~/Downloads/subversion-1.8.9
sh get-deps.sh serf
cd serf/
./configure
make
make install
cd ..
./configure --prefix=/usr/local --with-serf=/usr/local/serf
make
make install
 
==============================================
NOTE if you are getting an error like follows:
 
checking for APR-util... yes
checking for gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.10.xctoolchain/usr/bin/cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/Users/peterli/Downloads/subversion-1.8.9/serf':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
 
Solution:
You upgraded Xcode but didn't install the latest Command Line Tools.
Go to Apple Developer portal and download the maching Command Line Tools and install. eg if you have xcode 6.1.1, download and install the Command Line Tools for xcode v6.1.1
=============================================
 
#
# check svn version
#
svn --version
 
you should now have svn 1.8.x installed.
 
What next... now to get the svn file status showing in xcode file list in the left side of window... eg show M when file modified.
 
sudo -s
cd /Applications/Xcode.app/Contents/Developer/usr/bin
 
#
# move the original commands aside for safe keeping
#
mkdir svn17
mv svn* svn17
 
#
# link new ones in (asuming your env is setup to install in /usr/local/bin)
# so xcode uses svn 1.8 binaries
#
ln -s /usr/local/bin/svn svn
ln -s /usr/local/bin/svnadmin svnadmin
ln -s /usr/local/bin/svndumpfilter svndumpfilter
ln -s /usr/local/bin/svnlook svnlook
ln -s /usr/local/bin/svnrdump svnrdump
ln -s /usr/local/bin/svnserve svnserve
ln -s /usr/local/bin/svnsync svnsync
ln -s /usr/local/bin/svnversion svnversion
 
 
when you now open xcode and a project, the file status' now show... yay...
 
BUT, wait, the history is not working in that nice Time Machine like UI...
 
The problem:
The new svn tool has no access to keychain to read all the credentials, and xcode does not really show this error, it silently fails and does not give the option to resolve it.
 
The solution:
- open terminal
- cd to your project (assuming its a svn 1.8 project)
- type 'svn log'
- what you may see (rather than a history) is a OS prompt stating svn is trying to access something like "svn://..." with some options <Always Allow>, <Allow>, <Deny>... if you specify <Always Allow> you then get a history listing.
- when you now go back to Xcode6 and open the project, you can now use that "Time Machine" like history UI.
 
 

A bit of an effort, but worth it in the end.

出处:https://gist.github.com/PeterLi/0146930c9e04c962afe9

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值