subversion (svn)

30
Subversion (SVN) Presented by 李李李 R00944022 2012/2/21

Upload: gabriel-puckett

Post on 02-Jan-2016

37 views

Category:

Documents


5 download

DESCRIPTION

Subversion (SVN). Presented by 李明璋 R00944022 2012/2/21. 繆昕. 李明璋. 508. 506. When Programming…. Have you ever encountered these problems?. 第 2 筆測資終於可以跑了 , 可是原本可以過的測資壞了 !!. 起床後忘了昨天改過哪些東西 / 囧 \. 砍掉重練後發現原本寫的方法才是對的 QQ. 終於把 bug 底掉了 , 可是好像刪到不該刪的東西 ╰ ( 〒皿 〒 ) ╯. - PowerPoint PPT Presentation

TRANSCRIPT

Subversion (SVN)

Presented by 李明璋 R009440222012/2/21

508506

繆昕 李明璋

When Programming…• Have you ever encountered these problems?

第 2 筆測資終於可以跑了 , 可是原本可以過的測資壞了 !!

起床後忘了昨天改過哪些東西 / 囧 \

砍掉重練後發現原本寫的方法才是對的 QQ

終於把 bug 底掉了 , 可是好像刪到不該刪的東西╰ ( 〒皿〒 ) ╯

………………………………………………………………………………………………………..

阿阿 ~ 阿阿阿阿 ~ 硬碟冒煙了 !!!!

Thus, you always make a copy before you modify your files.

}

while(1){

BUT…

When Programming…

And when team working,above problems will become much more complex and serious!

Any Solution?

SVN!

What is Subversion (SVN)

• SVN is an efficiently version control system.

• Renamed/copied/moved/removed files/folders retain full version history.

• Open source licensed.

V.1 V.2

• http://katrina.csie.ntu.edu.tw/1002dsa/

• 點選送出查詢, server 會寄出一封確認信至您的學校信箱 ( 學號 @ntu.edu.tw) ,點選確認信的連結設定密碼,就完成 account 的申請了o Account: 學號o Password: 自行設定

How to get your account?

Enter your student ID number

SVN Client• TortoiseSVN

o http://tortoisesvn.net/

• SmartSVNo http://www.syntevo.com/smartsvn/index.html

• EasySVNo http://svn-ref.assembla.com/easysvn.html

SVN Client Download• http://tortoisesvn.net/downloads.html

Download link

Install TortoiseSVN

打開下載的TortoiseSVN 安裝程式

一路按 Next, Next,…, and Install

安裝成功

How to use TortoiseSVN?

• Checkout - 將資料夾與 SVN server 連接

• Commit - 上傳新版本 ( 新增 / 刪除 / 修改 )

• Update to the latest version• Revert to the previous version

Checkout Your Files

在任意一個資料夾內或資料夾圖示上按右鍵 , 點選 SVN Checkout…

Checkout Your Files

在 URL of repository 輸入 :svn://katrina.csie.ntu.edu.tw/1002dsa/學號接著按下 OK

Checkout Your Files

輸入之前拿到的 account, password按下 OK

Hint: 勾選 Save authentication, 否則每做一個動作就會要求輸入一次帳號密碼

Checkout Your Files

完成 ~

Commit Edited Files

在 SVN 的資料夾 ( 有checkout 過的資料夾 ) 內或資料夾圖示上按右鍵 , 點選SVN Commit…

第一次 checkout 的資料夾是空的

Commit Edited Files

在 SVN 的資料夾 ( 有checkout 過的資料夾 ) 內或資料夾圖示上按右鍵 , 點選SVN Commit…

Commit Edited Files

這一欄是輸入將要上傳版本的描述 ( 強烈建議上傳時加上描述 )

這一欄會顯示你變動過的檔案 , 勾選確定要更新的檔案 , 按下 OK

Commit Edited Files

完成 !!

Update to the Latest Version

在 SVN 的資料夾 ( 有checkout 過的資料夾 ) 內或資料夾圖示上按右鍵 , 點選SVN Update

Update to the Latest Version

Finished~~

Update to Previous Versions

在 SVN 的資料夾 ( 有 checkout 過的資料夾 ) 內或資料夾圖示上按右鍵 , 點選 TortoiseSVN → Update to revision…

Update to Previous Versions

點選 Show log列出所有曾經上傳過的版本

Update to Previous Versions

從眾多歷史資料中挑選出你要回溯的版本 , 按下 OK 確認

Hint: 在上傳時加入描述 , 可以更有效率地找到想要的版本

Update to Previous Versions

完成 ^^

SVN Commands• Checkout

o svn checkout svn://katrina.csie.ntu.edu.tw/1002dsa/r00944022• Type tour account & password

• Add file/folder o svn add [file/folder name]

• Commit file/foldero svn ci –m “message” [file/folder name]( 指定 commit 那些檔案 ) o svn ci –m “message” ( 有修改 / 新增 / 刪除的都 commit)

• Update to the latest versiono svn up

• Update to previous versionso svn up –r[ 版本 ]

• Look up committed messageso svn log More references about SVN commands and

scripts:http://www.yolinux.com/TUTORIALS/Subversion.html

SVN client for Mac and Linux

• EasySVNo http://svn-ref.assembla.com/download-clients.html

• SmartSVNo http://www.syntevo.com/smartsvn/download-archive.html