版權(quán)說(shuō)明:本文檔由用戶(hù)提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、All SubTrain materials are published under the Creative Commons Attribution License and contain material from other works published under the same license. To view a copy of this license, visit /licenses/by/2.0/ or send a letter to Creative Commons, 559 Nathan AbbottWay, Sta
2、nford, California 94305, USA. Special thanks to the authors of the comprehensive subversion book book “Version Control with Subversion” by Ben Collins-Sussman, Brian W. Fitzpatrick, and C. Michael Pilato. You are free to adjust the materials to your needs. Please respect our work by adding the SubTr
3、ain logo to your slides.Subversion輕松之旅工程師篇網(wǎng)站運(yùn)營(yíng)部 前端工程師 李偉Subtrain - SVN User Training Polarion Software 20072大綱大綱初級(jí)課程1 Subversion 簡(jiǎn)介2 典型工作流程3 沙盤(pán)演練其它常用操作5 好習(xí)慣,壞習(xí)慣Subtrain - SVN User Training Polarion Software 20073大綱大綱中級(jí)課程(團(tuán)隊(duì)協(xié)作)Part11 打標(biāo)簽 (Tagging) 沙盤(pán)演練1Part22 沖突 (Conflicts) 沙盤(pán)演練23 鎖(Locking) 沙盤(pán)演練3Sub
4、train - SVN User Training Polarion Software 20074大綱大綱高級(jí)課程(團(tuán)隊(duì)協(xié)作II)1 團(tuán)隊(duì)工作模式2 分支(Branching)3 合并(Merging)4 典型案例5 沙盤(pán)演練 SVN初級(jí)課程Subtrain - SVN User Training Polarion Software 20076大綱大綱初級(jí)課程1 Subversion 簡(jiǎn)介2 典型工作流程3 沙盤(pán)演練 其它常用操作5 好習(xí)慣,壞習(xí)慣簡(jiǎn)介Subversion 歷史Subversion 概覽Subtrain - SVN User Training Polarion Software
5、 20078Subversion 定義定義Subversion 是一個(gè)開(kāi)源的開(kāi)源版本控制軟件。Subversive activity is the lending of aid, comfort, and moral support to individuals, groups, or organizations that advocate the overthrow of incumbent governments by force and violence. All willful acts that are intended to be detrimental to the best i
6、nterests of the government and that do not fall into the categories of treason, sedition, sabotage, or espionage are placed in the category of subversive activity. Subtrain - SVN User Training Polarion Software 20079Subversion 歷史歷史June 2000 - Coding begins.August 2001 - Subversion becomes self-hosti
7、ng.2002 1st release 2004 Feb. Release 1.0.02006 Sept. Release 1.4.02007 Jan Release 1.4.4Estimated amount of Subversion developers: 1.4 millionSubtrain - SVN User Training Polarion Software 200710Subversion的用戶(hù)和規(guī)模的用戶(hù)和規(guī)模481 577 RevisionsTestimonial:Stuart Robertson of Absolute Systems, Inc (5 May 2004
8、)In the last 4 months we have migrated all of our internal product source repositories from XXX to SVN Our largest SVN repository is now 3.7GB and currently has 68806 revisions. We are running SVN 1.0.1 + Apache 2.0.48 on Linux. .SVN is a superb piece of work, and it is a *huge* step forward from XX
9、X. To put things in perspective. previously we had 26 XXX databases for one productMore testimonials on: /testimonials.htmlSource of information: /viewvc/Subtrain - SVN User Training Polarion Software 200711Subversion 概念概念Most current CVS features. Subv
10、ersion is meant to be a better CVS, so it has most of CVSs features. Generally, Subversions interface to a particular feature is similar to CVSs, except where theres a compelling reason to do otherwise.Directories, renames, and file meta-data are versioned. Lack of these features is one of the most
11、common complaints against CVS. Subversion versions not only file contents and file existence, but also directories, copies, and renames. It also allows arbitrary metadata (properties) to be versioned along with any file or directory, and provides a mechanism for versioning the execute permission fla
12、g on files. Commits are truly atomic. No part of a commit takes effect until the entire commit has succeeded. Revision numbers are per-commit, not per-file; log messages are attached to the revision, not stored redundantly as in CVS.Apache network server option, with WebDAV/DeltaV protocol. Subversi
13、on can use the HTTP-based WebDAV/DeltaV protocol for network communications, and the Apache web server to provide repository-side network service. This gives Subversion an advantage over CVS in interoperability, and provides various key features for free: authentication, path-based authorization, wi
14、re compression, and basic repository browsing. Standalone server option. Subversion also offers a standalone server option using a custom protocol (not everyone wants to run Apache 2.x). The standalone server can run as an inetd service, or in daemon mode, and offers basic authentication and authori
15、zation. It can also be tunnelled over ssh.Branching and tagging are cheap (constant time) operations There is no reason for these operations to be expensive, so they arent.Branches and tags are both implemented in terms of an underlying copy operation. A copy takes up a small, constant amount of spa
16、ce. Any copy is a tag; and if you start committing on a copy, then its a branch as well. (This does away with CVSs branch-point tagging, by removing the distinction that made branch-point tags necessary in the first place.)Natively client/server, layered library design Subversion is designed to be c
17、lient/server from the beginning; thus avoiding some of the maintenance problems which have plagued CVS. The code is structured as a set of modules with well-defined interfaces, designed to be called by other applications.Client/server protocol sends diffs in both directions The network protocol uses
18、 bandwidth efficiently by transmitting diffs in both directions whenever possible (CVS sends diffs from server to client, but not client to server).Costs are proportional to change size, not data size In general, the time required for a Subversion operation is proportional to the size of the changes
19、 resulting from that operation, not to the absolute size of the project in which the changes are taking place. This is a property of the Subversion repository model.Choice of database or plain-file repository implementations Repositories can be created with either an embedded database back-end (Berk
20、eleyDB) or with normal flat-file back-end, which uses a custom format.Versioning of symbolic links Unix users can place symbolic links under version control. The links are recreated in Unix working copies, but not in win32 working copies.Efficient handling of binary files Subversion is equally effic
21、ient on binary as on text files, because it uses a binary diffing algorithm to transmit and store successive revisions.Parseable output All output of the Subversion command-line client is carefully designed to be both human readable and automatically parseable; scriptability is a high priority. Loca
22、lized messages Subversion uses gettext() to display translated error, informational, and help messages, based on current locale settings.Subtrain - SVN User Training Polarion Software 200712SVN作用作用代碼文檔統(tǒng)一存放便于協(xié)作歷史可回溯組件級(jí)版本控制通過(guò)標(biāo)簽建立基線(xiàn)通過(guò)分支支持并行開(kāi)發(fā)Subtrain - SVN User Training Polarion Software 200713SVN優(yōu)勢(shì)優(yōu)勢(shì)開(kāi)
23、源原子提交目錄版本化建立分支容易合并功能強(qiáng)大打標(biāo)簽方便更好的二進(jìn)制處理Subtrain - SVN User Training Polarion Software 200714SVN與與VSS的區(qū)別的區(qū)別SVN數(shù)據(jù)庫(kù)不共享,更安全支持LINUX等更多操作系統(tǒng)默認(rèn)可以多人同時(shí)修改一個(gè)文件更直觀的打tag和建立分支Subversion 架構(gòu)架構(gòu)簡(jiǎn)介倉(cāng)庫(kù)(Repository) 布局全局修訂版本號(hào)(revision)遠(yuǎn)程倉(cāng)庫(kù)和本地副本Subtrain - SVN User Training Polarion Software 200716Subversion 架構(gòu)架構(gòu)概述概述Berkley DBFS
24、FSSubversionRepositoryClient InterfaceRepository InterfaceGUI client appsCommandlineclient appsClientLibraryWorking Copy Management LibraryRepositoryaccessDAVSVNLocalApachemod_davmod_dav_svnsvnserveInternet(Any TCP/IP Network)Subtrain - SVN User Training Polarion Software 200717file:/ 直接版本庫(kù)訪(fǎng)問(wèn)(本地磁盤(pán))。
25、svn:/ 通過(guò)未認(rèn)證TCP/IP的svnserve服務(wù)自定義協(xié)議。svn+ssh:/ 認(rèn)證并加密的TCP/IP訪(fǎng)問(wèn),通過(guò)自定義協(xié)議訪(fǎng)問(wèn)svnserve服務(wù)器。http:/ 通過(guò)配置Subversion的Apache服務(wù)器的WebDAV協(xié)議。https:/和 http:/一樣, 但使用 SSL 加密. (新浪使用https協(xié)議訪(fǎng)問(wèn),且采用郵箱LDAP認(rèn)證)Subversion 架構(gòu)架構(gòu)訪(fǎng)問(wèn)訪(fǎng)問(wèn) URLsSubtrain - SVN User Training Polarion Software 200718tagsbranches trunkProject 1RootProject 2Subv
26、ersion 架構(gòu)架構(gòu)倉(cāng)庫(kù)倉(cāng)庫(kù)(Repository)布局布局tagsbranches trunksrcdoc源代碼文檔Subtrain - SVN User Training Polarion Software 200719Subversion 架構(gòu)架構(gòu)倉(cāng)庫(kù)倉(cāng)庫(kù)(Repository)布局布局Subtrain - SVN User Training Polarion Software 200720Subversion 架構(gòu)架構(gòu)倉(cāng)庫(kù)倉(cāng)庫(kù)(Repository)布局布局主干:開(kāi)發(fā)主線(xiàn)標(biāo)簽:存放各里程碑的快照分支:并行開(kāi)發(fā),如缺陷修復(fù)tagsbranches trunkProject 1RootP
27、roject 2tagsbranches trunkSubtrain - SVN User Training Polarion Software 200721Subversion 架構(gòu)架構(gòu)修訂版本號(hào)修訂版本號(hào)(revision )0 1 2 3Subtrain - SVN User Training Polarion Software 200722Subversion 架構(gòu)架構(gòu)修訂版本號(hào)修訂版本號(hào)(revision )每次提交產(chǎn)生一個(gè)修訂版本號(hào)(revision)=整個(gè)倉(cāng)庫(kù)的整體版本遞增原子提交產(chǎn)生的修訂版本號(hào)(revision)在每個(gè)倉(cāng)庫(kù)都是全局唯一的Subtrain - SVN User
28、Training Polarion Software 200723Subversion 架構(gòu)架構(gòu)遠(yuǎn)程倉(cāng)庫(kù)和本地副本遠(yuǎn)程倉(cāng)庫(kù)和本地副本CommitServerThe client machineRemote RepositoryURL: Working CopyCheckout/UpdateSubtrain - SVN User Training Polarion Software 200724Subversion 架構(gòu)架構(gòu)遠(yuǎn)程倉(cāng)庫(kù)和本地副本遠(yuǎn)程倉(cāng)庫(kù)和本地副本.svn的文件夾本地副本管理目錄問(wèn)題:如果把.svn目錄刪除,會(huì)怎樣?如果把Working copy拷貝到另一個(gè)項(xiàng)目目錄里想作為新目錄提交
29、,會(huì)怎樣?典型工作流程 概述導(dǎo)入(Import)檢出(Checkout)查看變動(dòng)(Looking for Changes)提交(Commit)添加、刪除、移動(dòng)/更名“反悔”(revert)Subtrain - SVN User Training Polarion Software 200726典型工作流程典型工作流程svn checkout獲得內(nèi)容svn addsvn movesvn deletesvn rename修改svn status -u 看看我在本地都修改了哪些?svn update更新本地工作副本(working copy)svn diffsvn resolved合并(Merge)
30、你的修改解決沖突svn commit提交你的修改105100106Subversion倉(cāng)庫(kù)(Repository)Subtrain - SVN User Training Polarion Software 2007273個(gè)功能足矣個(gè)功能足矣svn checkoutsvn updatesvn commitSubversionRepositorySubtrain - SVN User Training Polarion Software 200728將本地存儲(chǔ)的項(xiàng)目導(dǎo)入(import)遠(yuǎn)程倉(cāng)庫(kù)Repository ServerThe client machine典型工作流程典型工作流程將項(xiàng)目導(dǎo)入
31、將項(xiàng)目導(dǎo)入 SubversionSubtrain - SVN User Training Polarion Software 200729典型工作流程典型工作流程用命令行導(dǎo)入用命令行導(dǎo)入(import)項(xiàng)目項(xiàng)目切換到你想導(dǎo)入的項(xiàng)目目錄下svn import . http:/svnserver/ -m”- Import Message”使用subversion 子命令 “import .你想導(dǎo)入的目錄(包括整個(gè)子目錄樹(shù)),也可以使用絕對(duì)路徑.倉(cāng)庫(kù)(repository) URL.提交日志選項(xiàng).用雙引號(hào)包含提交日志.Subtrain - SVN User Training Polarion Sof
32、tware 200730典型工作流程典型工作流程用命令行導(dǎo)入用命令行導(dǎo)入(import)項(xiàng)目項(xiàng)目Subtrain - SVN User Training Polarion Software 200731典型工作流程典型工作流程用用TortoiseSVN導(dǎo)入導(dǎo)入(import)項(xiàng)目項(xiàng)目Subtrain - SVN User Training Polarion Software 200732典型工作流程典型工作流程用用TortoiseSVN導(dǎo)入導(dǎo)入(import)項(xiàng)目項(xiàng)目Subtrain - SVN User Training Polarion Software 200733檢出(check ou
33、t) 將項(xiàng)目從服務(wù)器倉(cāng)庫(kù)(repository ) 傳到本地的客戶(hù)機(jī)上Repository ServerThe client machine 檢出工作副本(working copy)典型工作流程典型工作流程檢出檢出(Check Out)Subtrain - SVN User Training Polarion Software 200734典型工作流程典型工作流程用命令行檢出用命令行檢出(Check Out)檢出檢出(Check Out)項(xiàng)目是與他人協(xié)同工作的第一步項(xiàng)目是與他人協(xié)同工作的第一步:svn checkout http:/svnserver/ 使用Subversion子命令 “che
34、ckout.倉(cāng)庫(kù)(Repository) URL.本地存儲(chǔ)項(xiàng)目的目錄,也就是所謂的工作副本(working copy, WC)Subtrain - SVN User Training Polarion Software 200735典型工作流程典型工作流程用命令行檢出用命令行檢出(Check Out)Subtrain - SVN User Training Polarion Software 200736典型工作流程典型工作流程用用TortoiseSVN 檢出檢出(Check Out)Subtrain - SVN User Training Polarion Software 200737典型
35、工作流程典型工作流程用用TortoiseSVN 檢出檢出(Check Out)Subtrain - SVN User Training Polarion Software 200738典型工作流程典型工作流程用命令行更新用命令行更新(Update)切換到希望更新的目錄,更新切換到希望更新的目錄,更新(Update) :svn update使用Subversion子命令 “update.Subtrain - SVN User Training Polarion Software 200739典型工作流程典型工作流程用命令行更新用命令行更新(Update)Subtrain - SVN User T
36、raining Polarion Software 200740典型工作流程典型工作流程用用TortoiseSVN更新更新(Update)Subtrain - SVN User Training Polarion Software 200741典型工作流程典型工作流程用命令行添加文件用命令行添加文件/目錄目錄(add)添加只意味本地工作副本修改了,待下次提交時(shí),才添加到倉(cāng)庫(kù)中.svn add file(s) 使用Subversion子命令“add”- 用空格分隔的一個(gè)或多個(gè)文件,如果是目錄,目錄中整個(gè)目錄樹(shù)、文件都會(huì)被添加,當(dāng)然,也可以用-non-recursive (-N) 選項(xiàng)來(lái)改變.Su
37、btrain - SVN User Training Polarion Software 200742典型工作流程典型工作流程用命令行添加文件用命令行添加文件/目錄目錄(add)Subtrain - SVN User Training Polarion Software 200743典型工作流程典型工作流程用用TortoiseSVN添加文件添加文件/目錄目錄(add)Subtrain - SVN User Training Polarion Software 200744典型工作流程典型工作流程用命令行刪除文件用命令行刪除文件/目錄目錄(delete)刪除 文件/目錄:svn delete f
38、ile(s)使用Subversion子命令 “delete”用空格分隔的一個(gè)或多個(gè)文件,這些文件將會(huì)被標(biāo)記為計(jì)劃刪除. 如果是目錄,那么其子目錄(遞歸)都將被刪除.如果想刪除已經(jīng)修改了的文件,請(qǐng)用-force 選項(xiàng).Subtrain - SVN User Training Polarion Software 200745典型工作流程典型工作流程用命令行刪除文件用命令行刪除文件/目錄目錄(delete)Subtrain - SVN User Training Polarion Software 200746典型工作流程典型工作流程用用TortoiseSVN刪除文件刪除文件/目錄目錄(delete
39、)Subtrain - SVN User Training Polarion Software 200747典型工作流程典型工作流程用用TortoiseSVN更改文件更改文件/目錄名目錄名(rename)Subtrain - SVN User Training Polarion Software 200748典型工作流程典型工作流程命令回顧命令回顧獲取 更新添加文件或目錄刪除文件或目錄更改文件或目錄名Subtrain - SVN User Training Polarion Software 200749典型工作流程典型工作流程用命令行移動(dòng)文件用命令行移動(dòng)文件/目錄目錄(move)文件/目錄更
40、名:svn move source destination使用Subversion 子命令 “move.要更名/移動(dòng)的源文件/目錄.目標(biāo)文件/目錄.Subtrain - SVN User Training Polarion Software 200750典型工作流程典型工作流程用命令行移動(dòng)文件用命令行移動(dòng)文件/目錄目錄(move)Subtrain - SVN User Training Polarion Software 200751典型工作流程典型工作流程用命令行復(fù)制文件用命令行復(fù)制文件/目錄目錄(copy)復(fù)制文件/目錄:svn copy source destination使用Subve
41、rsion 子命令“copy.源文件/目錄.目標(biāo)文件/目錄.Subtrain - SVN User Training Polarion Software 200752典型工作流程典型工作流程用命令行復(fù)制文件用命令行復(fù)制文件/目錄目錄(copy)Subtrain - SVN User Training Polarion Software 200753典型工作流程典型工作流程用用TortoiseSVN移動(dòng)移動(dòng)/復(fù)制復(fù)制 文件文件/目錄目錄(move,copy)用TortoiseSVN移動(dòng)/復(fù)制 文件/目錄 用右鍵拖拽要移動(dòng)/復(fù)制的源目錄到目標(biāo)目錄,松開(kāi)右鍵就會(huì)看到下面用于復(fù)制/移動(dòng)的右鍵菜單Sub
42、train - SVN User Training Polarion Software 200754典型工作流程典型工作流程用命令行提交用命令行提交(commit)修改修改提交你的修改:svn commit -m”- Log Message”用Subversion 子命令 “commit .提交日志選項(xiàng).提交日志.如果你沒(méi)有用 -m 選項(xiàng),subversion 會(huì)調(diào)用缺省編輯器讓你書(shū)寫(xiě)提交日志.Subtrain - SVN User Training Polarion Software 200755典型工作流程典型工作流程用命令行提交用命令行提交(commit)修改修改Subtrain - S
43、VN User Training Polarion Software 200756典型工作流程典型工作流程用用TortoiseSVN提交提交(commit)修改修改Subtrain - SVN User Training Polarion Software 200757典型工作流程典型工作流程用用TortoiseSVN提交提交(commit)修改修改Subtrain - SVN User Training Polarion Software 200758典型工作流程典型工作流程注意注意 用下面的subversion 命令,而不要直接移動(dòng)、刪除、拷貝、創(chuàng)建目錄:svn movesvn delet
44、esvn copysvn mkdir如果使用集成在Explorer中的TortoiseSVN會(huì)更省事兒Subtrain - SVN User Training Polarion Software 200759檢查一下有什么東西改動(dòng)了svn statusSubversion 子命令 “status” .典型工作流程典型工作流程用命令行查看變動(dòng)用命令行查看變動(dòng)(status)Subtrain - SVN User Training Polarion Software 200760典型工作流程典型工作流程用命令行查看變動(dòng)用命令行查看變動(dòng)(status)Subtrain - SVN User Trai
45、ning Polarion Software 200761典型工作流程典型工作流程用命令行查看變動(dòng)用命令行查看變動(dòng)(status)命令行輸出的第一列命令行輸出的第一列(文件狀態(tài)文件狀態(tài))解釋?zhuān)航忉專(zhuān)篈: 計(jì)劃提交到倉(cāng)庫(kù)計(jì)劃提交到倉(cāng)庫(kù)(repository)中的文件、目錄或符號(hào)鏈接中的文件、目錄或符號(hào)鏈接.C: 處于沖突狀態(tài)中的文件。這意味著,在你檢出文件修改期間,有人修改并提交了這個(gè)文件,你得在提交前解決沖突.D: 計(jì)劃在倉(cāng)庫(kù)計(jì)劃在倉(cāng)庫(kù)(repository)中刪除的文件、目錄或符號(hào)鏈接中刪除的文件、目錄或符號(hào)鏈接.R: 將會(huì)被倉(cāng)庫(kù)(repository) 替換的文件、目錄或符號(hào)鏈接。也就是說(shuō)
46、,它們已經(jīng)在倉(cāng)庫(kù)中(repository)中被刪除,然后新增了一個(gè)同名對(duì)象,所有的這些都在一個(gè)修訂版本號(hào)(revision)中發(fā)生的.X: 納入版本控制的目錄,但與外部Subversion倉(cāng)庫(kù)相關(guān).?: 沒(méi)有納入版本控制的文件、目錄或符號(hào)鏈接沒(méi)有納入版本控制的文件、目錄或符號(hào)鏈接. !: 納入版本控制的文件、目錄或符號(hào)鏈接不見(jiàn)或是不完成。通常發(fā)生這樣的情況都是因?yàn)榧{入版本控制的文件、目錄或符號(hào)鏈接不見(jiàn)或是不完成。通常發(fā)生這樣的情況都是因?yàn)橛昧朔怯昧朔莝ubversion的方法移除了這些文件。的方法移除了這些文件。. = svn update 可以從服務(wù)器重新取出文件、目錄 或= svn rev
47、ert file 可以 恢復(fù)不見(jiàn)了的文件.:納入版本控制的文件、目錄或符號(hào)鏈接,在你的本地工作副本的卻是其它形式,刪除或新建目錄。I: 由于Subversion 的“忽略”設(shè)置而沒(méi)有納入版本控制的文件、目錄或符號(hào)鏈接Subtrain - SVN User Training Polarion Software 200762Status normalAdded file/directorydeleted file/directoryLockedModifiedRead only典型工作流程典型工作流程用用TortoiseSVN查看變動(dòng)查看變動(dòng)(status)Subtrain - SVN User
48、Training Polarion Software 200763典型工作流程典型工作流程用命令行比較差異用命令行比較差異(diff)比較修改后和修改前的差異:svn diff使用Subversion子命令 “diff” .如果沒(méi)有任何選項(xiàng),你所看的diff結(jié)果是本地工作副本和.svn目錄中保存的緩存的比較結(jié)果.Subtrain - SVN User Training Polarion Software 200764典型工作流程典型工作流程用命令行比較差異用命令行比較差異(diff)Subtrain - SVN User Training Polarion Software 200765典型工
49、作流程典型工作流程用用TortoiseSVN比較差異比較差異(diff)查看本地文件修改后與修改前的差異: 方法1:右鍵菜單 Menu - Diff如果是文本文件,則通過(guò)SVN的merge工具比較如果是office文檔,則通過(guò)office自帶的合并功能在修訂列表中顯示Subtrain - SVN User Training Polarion Software 200766典型工作流程典型工作流程用用TortoiseSVN比較差異比較差異(diff)方法2:Commit時(shí)進(jìn)行比較Subtrain - SVN User Training Polarion Software 200767典型工作流程
50、典型工作流程用命令行用命令行“反悔反悔”(revert)用命令行來(lái)”反悔”:svn revert destination 使用 Subversion 子命令“revert”. 要”反悔”的目標(biāo)文件/目錄.如果你想”反悔”整個(gè)目錄中的文件/目錄, 用 “ -recursive“ 選項(xiàng). Subtrain - SVN User Training Polarion Software 200768典型工作流程典型工作流程用用TortoiseSVN“反悔反悔”(revert)我在本地的SVN某個(gè)操作取消,回滾到修改前的狀態(tài),而不是倉(cāng)庫(kù)最新?tīng)顟B(tài)。右鍵菜單 TortoiseSVN - Revert或Chec
51、k for modifications中Revert或Subtrain - SVN User Training Polarion Software 200769典型工作流程典型工作流程 “反悔反悔”(revert)反悔(revert)操作是如何實(shí)現(xiàn)的?Subversion 檢出時(shí),在本地工作副本的.svn中存了一個(gè) “pristine” 副本.下面所有的操作都能回滾:addremovecopydeletemkdir但如果已提交,這個(gè)操作就不管用了.Subtrain - SVN User Training Polarion Software 200770典型工作流程典型工作流程命令回顧命令回顧移
52、動(dòng)復(fù)制提交查看變動(dòng)比較差異“反悔”撤銷(xiāo)修改Subtrain - SVN User Training Polarion Software 200771典型工作流程典型工作流程TortoiseSVN常用命令一覽常用命令一覽All SubTrain materials are published under the Creative Commons Attribution License and contain material from other works published under the same license. To view a copy of this license, vis
53、it /licenses/by/2.0/ or send a letter to Creative Commons, 559 Nathan AbbottWay, Stanford, California 94305, USA. Special thanks to the authors of the comprehensive subversion book book “Version Control with Subversion” by Ben Collins-Sussman, Brian W. Fitzpatrick, and C. Mi
54、chael Pilato. You are free to adjust the materials to your needs. Please respect our work by adding the SubTrain logo to your slides.典型工作流程典型工作流程沙盤(pán)演練沙盤(pán)演練Subtrain - SVN User Training Polarion Software 200773沙盤(pán)演練沙盤(pán)演練從模擬沙盤(pán)中檢出(checkout) URL of repository: https:/ /項(xiàng)目URLStart Your Engine! (限時(shí):10分鐘)指導(dǎo)、講評(píng)S
55、ubtrain - SVN User Training Polarion Software 200774演練回顧演練回顧大家談?wù)勗谘菥氈凶约旱牟僮魅绾??列舉1、2、3。Subtrain - SVN User Training Polarion Software 200775常見(jiàn)問(wèn)題常見(jiàn)問(wèn)題(FAQ)對(duì)文件的常見(jiàn)不正確操作重命名Rename:提個(gè)醒先刪除Delete,后添加Add直接改名后,提交commit 移動(dòng)Move 將文件移動(dòng)到非SVN目錄(即本地私有目錄) 用左鍵拖曳Subtrain - SVN User Training Polarion Software 200776常見(jiàn)問(wèn)題常見(jiàn)問(wèn)題
56、(FAQ) Cont.提交Commit修改到什么時(shí)候commit? 推薦:已完成一個(gè)任務(wù)且本地驗(yàn)證無(wú)誤。在哪里使用Commit? 推薦:本地副本的根目錄下提交,方便找出所有子目錄中待提交的文件。All SubTrain materials are published under the Creative Commons Attribution License and contain material from other works published under the same license. To view a copy of this license, visit http:/cre
57、/licenses/by/2.0/ or send a letter to Creative Commons, 559 Nathan AbbottWay, Stanford, California 94305, USA. Special thanks to the authors of the comprehensive subversion book book “Version Control with Subversion” by Ben Collins-Sussman, Brian W. Fitzpatrick, and C. Michael Pilato
58、. You are free to adjust the materials to your needs. Please respect our work by adding the SubTrain logo to your slides.TortoiseSVN其它常用操作Subtrain - SVN User Training Polarion Software 200778查看查看Subtrain - SVN User Training Polarion Software 200779本地和某個(gè)本地和某個(gè)revision的多文件比較的多文件比較選中要獲取的目錄或文件,選擇show log
59、Subtrain - SVN User Training Polarion Software 200780兩個(gè)兩個(gè)revision間的多文件比較間的多文件比較Subtrain - SVN User Training Polarion Software 200781如何獲取某個(gè)歷史如何獲取某個(gè)歷史revision的文件的文件操作:選擇某個(gè)目錄,show log,對(duì)某個(gè)revison,CheckoutSubtrain - SVN User Training Polarion Software 200782通過(guò)屬性將文件只讀通過(guò)屬性將文件只讀選中某個(gè)文件,選擇properties屬性,選中Add添加
60、,property name選擇svn:needs-lock,最后對(duì)該文件執(zhí)行Commit后將生效。文件圖標(biāo)改成“只讀”,任何人都不能修改。直到刪除該屬性。Subtrain - SVN User Training Polarion Software 200783通過(guò)屬性設(shè)置共享目錄通過(guò)屬性設(shè)置共享目錄選中某個(gè)目錄,選擇properties屬性,選中Add添加,property name選擇svn:externals,value寫(xiě)上 目錄名 URL。Ok后提交即生效。Subtrain - SVN User Training Polarion Software 200784設(shè)置添加目錄文件時(shí)需忽略
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶(hù)所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶(hù)上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶(hù)上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶(hù)因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年珠寶首飾銷(xiāo)售年度合同模板3篇
- 深圳2025年度物流服務(wù)合作協(xié)議2篇
- 2025年物業(yè)租賃合同變更擔(dān)保合同正規(guī)范范本3篇
- 2025年水電站水資源優(yōu)化配置轉(zhuǎn)讓合同3篇
- 二零二五版出租車(chē)企業(yè)品牌形象授權(quán)使用合同3篇
- 2025年企業(yè)集團(tuán)合作項(xiàng)目解除和解協(xié)議
- 2025年《辦公室裝修合同》
- 2025年度二零二五版媒體內(nèi)容授權(quán)使用合同4篇
- 合伙股份協(xié)議書(shū)(四人2025年版)3篇
- 二零二五年度2025版非全日制用工人員服務(wù)協(xié)議3篇
- 小學(xué)一年級(jí)20以?xún)?nèi)加減法混合運(yùn)算3000題(已排版)
- 智慧工廠數(shù)字孿生解決方案
- 病機(jī)-基本病機(jī) 邪正盛衰講解
- 品管圈知識(shí) 課件
- 非誠(chéng)不找小品臺(tái)詞
- 2024年3月江蘇省考公務(wù)員面試題(B類(lèi))及參考答案
- 患者信息保密法律法規(guī)解讀
- 老年人護(hù)理風(fēng)險(xiǎn)防控PPT
- 充電樁采購(gòu)安裝投標(biāo)方案(技術(shù)方案)
- 醫(yī)院科室考勤表
- 鍍膜員工述職報(bào)告
評(píng)論
0/150
提交評(píng)論