Chinaunix首页 | 论坛 | 博客
  • 博客访问: 950739
  • 博文数量: 168
  • 博客积分: 3853
  • 博客等级: 中校
  • 技术积分: 1854
  • 用 户 组: 普通用户
  • 注册时间: 2008-01-15 23:50
文章分类

全部博文(168)

文章存档

2014年(12)

2013年(46)

2012年(60)

2011年(11)

2010年(1)

2009年(17)

2008年(21)

我的朋友

分类: iOS平台

2014-02-25 12:37:08

最近开始使用mac开发,XCode4.6自带了git和svn, 非常的方便,XCode4.5与此类同. 
首先,  选择菜单 "File/Source Control/Repositories" 打开版本控制的属性页, 如下:
mac 系统 xcode 下 配置svn客户端 - 黑豆 - 黑豆的博客

点击左下角的小加号"+",   在弹出菜单选择 "Checkout or Cloe Repositories", 在弹出页面中输入svn地址, 如下图所示:
值得说明的是, 这里的url要写到要checkout的项目, 只填写svn根目录在下一步认证时会报错的.
mac 系统 xcode 下 配置svn客户端 - 黑豆 - 黑豆的博客

在下一步页面中name也要输入和要checkout的项目名相同,  我们既然要使用svn, 在type选项就不要选择Git了 , 你非要选择我也没办法啦!
mac 系统 xcode 下 配置svn客户端 - 黑豆 - 黑豆的博客
 

接下来系统会要你选择保存目录和另存名, 你可以指定任何你喜欢的名字, 不过最好还是和svn服务器保持一致吧, 以后也不会弄乱
选定目录后点击"Checkout",
mac 系统 xcode 下 配置svn客户端 - 黑豆 - 黑豆的博客
 
 如果朋友你使用的是http协议就等待checkout完毕的消息就可以了.
如果你和我一样是用的https加密协议, 就会可能看到系统弹出的报错信息. 
 The certificate is not issued by a trusted authority. Use the
 fingerprint to validate the certificate manually!

我对xcode不太熟悉, 不知道在ide中怎么设置, 没办法就在终端中先访问一下svn服务器, 看提示什么错误
在终端中输入: svn info (192.168.2.185是我的服务器ip)
回车,提示如下信息:
Error validating server certificate for '':
 - The certificate is not issued by a trusted authority. Use the    fingerprint to validate the certificate manually!  - The certificate hostname does not match. Certificate information:  - Hostname: xxxxxxx  - Valid: xxxxxxx  - Issuer: xxxxxx  - Fingerprint: xxxxxxxxx (R)eject, accept (t)emporarily or accept (p)ermanently? 
和在xcode中提示的基本相同, 不同的是这里提示我们是否要接受认证信息. 当然是要啦, 不然我们费这么大劲干嘛啊!
输入 "p" 选择 永久接受, 这样 xcode也就不再烦你了.

接下来就能看到这个项目在svn的更新提交记录

bogon:~ apple$ svn info
Path: ms
URL:
Repository Root:
Repository UUID: fa286b3c-0a81-c443-8b5e-5368dfdb82a9
Revision: 80
Node Kind: directory
Last Changed Author: pj
Last Changed Rev: 80
Last Changed Date: 2011-04-28 14:39:35 +0800 (四, 28  4 2011)

说明你已经服务器已经把你当做自己人了, 这时再去xcode中checkout就没有问题了. 如果不行就退出重新启动一下xcode重新重复上述操作

正在checkout, 等一下吧.....

mac 系统 xcode 下 配置svn客户端 - 黑豆 - 黑豆的博客
 

checkout成功了, 给自己小小庆祝一下吧!
mac 系统 xcode 下 配置svn客户端 - 黑豆 - 黑豆的博客
 
阅读(9626) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~