天天看點

使用subversion管理iOS源代碼

使用subversion管理ios源代碼

1、安裝和配置subversion伺服器

在windows 伺服器上安裝visualsvn-server,下載下傳位址http://www.visualsvn.com/server/download/。采用預設安裝,安裝完成建立一個伺服器的代碼倉庫hello,如圖所示。

使用subversion管理iOS源代碼

然後在users右鍵建立使用者tony,再回到hello倉庫右鍵- >properties,将tony使用者授權可以通路hello倉庫。

如果在浏覽器中通過https://192.168.1.103/svn/hello/網址通路沒有問題,說明伺服器端就安裝和配置好了。

2、配置mac os x 的subversion用戶端

一般的mac os x都已經安裝了subversion用戶端,不需要再次安裝了,但是由于用戶端要想通路伺服器,是需要進行安全認證的。https://192.168.1.103/svn/hello/說明這是一個采用的認證ssl,你需要授權用戶端就是xcode的mac os x的電腦。

為此,你需要在用戶端終端中輸入:

$svn list https://192.168.1.103/svn/hello/

error validating server certificate for 'https://192.168.1.103:443':

 - the certificate is not issued by atrusted authority. use the

   fingerprint to validate thecertificate manually!

 - the certificate hostname does notmatch.

certificate information:

 - hostname: zzr-pc

 - valid: from tue, 27 mar 201213:15:03 gmt until fri, 25 mar 2022 13:15:03 gmt

 - issuer: zzr-pc

 - fingerprint:fe:1b:4d:c1:27:b1:d1:cd:04:9f:11:ca:bb:93:0f:42:91:d2:0f:38

(r)eject, accept (t)emporarily or accept (p)ermanently? p

選擇輸入p

3、在xcode中設定subversion

在xcode工具欄organizer按鈕->repositories按鈕,選擇左下角+,如圖所示。

使用subversion管理iOS源代碼

點選add repository添加一個代碼倉庫,如圖所示在location中輸入https://192.168.1.103/svn/hello/,在name中輸入适當的名字。

使用subversion管理iOS源代碼

如果沒有錯誤,next按鈕是可以點選的。然後選擇root,當然這要看你的工程檔案想放在哪裡而定的。然後點選右下角的import将你本地的工程導入到遠端伺服器的代碼倉庫下面。

使用subversion管理iOS源代碼

如果能夠導入成功在伺服器端是可以看到這個工程目錄的。

4、xcode中使用subversion管理代碼

如果你不是一個管理者,你隻是需要從伺服器下載下傳工程代碼,那麼第一次啟動xcode的時候在啟動畫面中選擇connect to arepository如圖所示。

使用subversion管理iOS源代碼

在location輸入https://192.168.1.103/svn/hello/

使用subversion管理iOS源代碼

繼續閱讀