這裏顯示二個版本的差異處。
|
subversion [2009/08/26 17:03] bestlong |
subversion [2010/08/23 15:30] (目前版本) |
||
|---|---|---|---|
| 行 1: | 行 1: | ||
| ====== Subversion 版本控制系統 ====== | ====== Subversion 版本控制系統 ====== | ||
| + | 集中式的系統 | ||
| + | |||
| * http://subversion.tigris.org/ | * http://subversion.tigris.org/ | ||
| - | * http://svnbook.red-bean.com/ | + | * [[http://svnbook.red-bean.com/|SVNBook]] |
| - | * http://tortoisesvn.tigris.org/ | + | * [[http://tortoisesvn.tigris.org/|TortoiseSVN]] is a Subversion client, implemented as a windows shell extension. |
| + | * [[http://viewvc.tigris.org/|ViewVC — Web-based Version Control Repository Browsing]] | ||
| - | **基本操作** | + | * http://www.svn8.com/ 中文SVN技術資料(簡體) |
| - | * import | + | |
| - | * checkout | + | |
| - | * update | + | |
| - | * commit | + | |
| - | * branch | + | |
| - | * tag | + | |
| - | * switch | + | |
| - | * merge | + | |
| ===== Subversion Server + Apache + DAV ===== | ===== Subversion Server + Apache + DAV ===== | ||
| 行 58: | 行 53: | ||
| @dev1 = rw | @dev1 = rw | ||
| - | ===== 新專案 ===== | + | ===== 建立新專案 ===== |
| **專案目錄規劃架構** | **專案目錄規劃架構** | ||
| - | * trunk : Main line of development. | + | * trunk : Main line of development. 主幹,隨時都會因為開發而改變。 |
| + | * branches : 分支,有三種意義(搞定了、收爛攤子、想搞怪看看)。 | ||
| + | - Release branche | ||
| + | - Bug fix branche | ||
| + | - Experimental branche | ||
| * tags : Release | * tags : Release | ||
| - | * branches : 分支 | + | - Release tags |
| + | - Bug fix PRE and POST tags | ||
| **操作流程** | **操作流程** | ||
| - | 要先連線到 svn server 上開版本庫 | + | 要先連線到 svn server 上開版本庫,同時做好目錄規劃 |
| - | + | svnadmin create /opt/svn/repos/myproject | |
| - | cd /opt/svn/repos | + | svn mkdir file:///opt/svn/repos/myproject/trunk -m "Add trunk" |
| - | svnadmin create myproject | + | svn mkdir file:///opt/svn/repos/myproject/tags -m "Add tags" |
| + | svn mkdir file:///opt/svn/repos/myproject/branchs -m "Add branches" | ||
| 然後設定好存取權限 | 然後設定好存取權限 | ||
| 行 78: | 行 79: | ||
| svn checkout http://svn.bestlong.idv.tw/svn/myproject | svn checkout http://svn.bestlong.idv.tw/svn/myproject | ||
| - | 應該會詢問帳號密碼 | + | 應該會詢問帳號密碼,認證完成後就可以開始進行程式開發了。 |
| + | |||
| + | ===== 基本常用操作 ===== | ||
| + | ==== 將專案 Checkout 到本地目錄 ==== | ||
| + | svn checkout svn://svnserver/repo/project | ||
| + | checkout 可用簡寫 co | ||
| + | |||
| + | ==== 增加文件 ==== | ||
| + | |||
| + | === 增加 test.php 文件 === | ||
| + | svn add test.php | ||
| + | |||
| + | === 增加當前目錄下的所有 php 文件 === | ||
| + | svn add *.php | ||
| + | |||
| + | ==== 將異動 Commit 到版本庫 ==== | ||
| + | svn commit test.php -m "add test.php" | ||
| + | |||
| + | ===== 其他操作 ===== | ||
| + | * mkdir | ||
| + | * delete | ||
| + | |||
| + | * import | ||
| + | * update | ||
| + | * branch | ||
| + | * tag | ||
| + | * switch | ||
| + | * merge | ||