310 likes | 567 Views
Chapter2: Version Control. Student List: Nguyễn Lê Quốc Sơn Huỳnh Hữu Tài Lê Anh Tân Trần Thanh Thiện Trần Hoàng Thịnh. Reference. TortoiseSVN A Subversion client for Windows Version 1.7 by Stefan Küng , Lübbe Onken, and Simon Large
E N D
Chapter2: Version Control Student List: NguyễnLêQuốcSơn HuỳnhHữuTài LêAnhTân TrầnThanhThiện TrầnHoàngThịnh
Reference TortoiseSVNA Subversion client for WindowsVersion 1.7 by Stefan Küng, Lübbe Onken, and Simon Large Version Control with Subversion: For Subversion 1.4 by Ben Collins-Sussman, Brian W. Fitzpatrick, C.Michael Pilato http://www.google.com.vn/, http://www.wikipedia.org/ 02._Version_Control.pdf by Lecturer Ngô Huy Biên
Table of Contents Introduction to Version Control Why is Version Control important? The Basic Concepts Version Control Tools Install and Demo
What is Version Control? Version control is the management of changes to documents, programs, large web sites and other information stored as computer files. It is most commonly used in software development, where a team of people may change the same files. Changes are usually identified by a number or letter code, termed the "revision number“ or simply "revision". Each revision is associated with a timestamp and the person making the change. Revisions can be compared, restored, and with some types of files, merged.
Why is Version Control important? Any stored revision of a file can be retrieved to be viewed or changed. The differences between any two revisions can be displayed. Patches can be created automatically. Multiple developers can work simultaneously on the same project or file without loss of data. The project can be branched to allow simultaneous development along varied tracks. These branches can be merged back into the main line of development. Distributed development is supported across large or small networks.
The Basic Concepts Branch Checkout/Update Comment Commit Conflict Deltas Head Import Label Lock Merge Repository Resolve Revision Tag Trunk Working folder Workspace …
The Basic Concepts Branch A set of files under version control may be branched or forked at a point in time so that, from that time forward, two copies of those files may be developed at different speeds or in different ways independently of the other.
The Basic Concepts Checkout/Update Creates a local working copy/dowload from the repository. Comment Comments are the key to understanding your project’s history. Commit To save your working copy of the file into the repository. Referred to as Check-in in some version control systems.
The Basic Concepts Conflict The situation when two people try to commit changes that affect the same region of the same file. These must be resolved, either using a Merge tool, or manually. Deltas Is the difference between the two revisions. Head The most recent commit.
The Basic Concepts Import An import is the action of copying a local directory tree (that is not currently a working copy) into the repository for the first time. Label See tag. Label A "label" is a human-meaningful name that can be used to select a specific version from a version history. A label can be assigned to a specific version of a resource. The same label can be used in different version histories. Lock A lock prevents anybody from editing a file but you.
The Basic Concepts Merge A merge is the process of combining multiple changes and resolving any conflicts. If two programmers change a file separately and both check it in, the second programmer will need to merge in the first person's changes. Repository The repository is the master storage for all of your files and and their history. It's typically stored on the version control server. Each stand-alone project should have its own repository. Resolve The act of user intervention to address a conflict between different changes to the same document.
The Basic Concepts Revision Also version: A version is any change in form. In SVK, a Revision is the state at a point in time of the entire tree in the repository. Tag A tag or label refers to an important snapshot in time, consistent across many files. These files at that point may all be tagged with a user-friendly, meaningful name or revision number. See the discussion of baselines, labels, and tags. Trunk The unique line of development that is not a branch (sometimes also called Baseline or Mainline).
The Basic Concepts Working copy Your copy of the file that you actually make your changes in. Working folder Folder where you check files out to work on them, also referred to. Workspace An area where can work separated from the reposity and to isolate each user from the others.
Install and Demo Install VisualSVN Server2.5.2, TortoiseSVN 1.7.4 Create Repository by VisualSVN Server Create users in VisualSVN Server Add, commit, update, delete information in TortoiseSVN Check log in TortoiseSVN Check for modifications in TortoiseSVN Conflict in TortoiseSVN Branching – Merging in TortoiseSVN
Install VisualSVN Server 2.5.2& TortoiséVN 1.7.4 VisualSVN Server download link:http://www.visualsvn.com/files/VisualSVN-Server-2.5.2.msi TortoiseSVN download link:http://tortoisesvn.net/downloads.html
Create Repository Type the name of the repository and select check box if you want to use default structure for the repository
User Authorization Folder or repository On defaulf, everyone can access the information Right-click on folder or Repository -> Properties
User Authorization Permission level: - Inherit from parent - No access - Read only - Read/Write Add/Remove: user or group.
TortoiseSVN – Add, Commit, Update, Delete Add: add file to working copy, it can be transfer to repository the next time commit. Commit: Commit changes of working copy to repository. Update before. Update: Update the working copy from the repository. Delete: Delete file from working copy, the file in repository will be delete the next time commit .
TortoiseSVN – Check Log Log of changes of data with revision number, author, date ...
TortoiseSVN – Revision compares File: Compare with another revision: TortoiseSVN->Diff Compare with another branch or tag: TortoiseSVN ->Diff with URL Compare between 2 file : Chọn 2 file muốn so sánh sau đó chọn TortoiseSVN->Diff Revision: Compare with another revision : TortoiseSVN->Diff with previous version Compare between 2 revision: use Revision Log, select 2 revision, select Compare revisions in context menu. Compare working copy with a URL(Branch, ...): hold Shift and right click on file or folder, selectTortoiseSVN->Diff with URL
File conflicts Mark: <<<<<<< filename Your changes ======= Code merged from repository >>>>>>>> revision File: Filename.ext.mine ,Filename.ext.rOLDREV, Filename.ext.rNEWREV
Properties - Tree conflict Properties conflicts xảy ra khi 2 hay nhiều developer thay đổi cùng 1 thuộc tính. Như với file content, conflict được giải quyết bởi chính các developer Tree conflicts xảy ra khi developer moved/ renamed/ deleted 1 file hay 1 folder mà 1 developer lại chỉnh sửa (move/rename/deleted) nó. Ccos rất nhiều trạng thái khác nhau mà nó sẽ có kết quả là 1 tree Conflict. Và tất cả những điều đó yêu cầu những bước khác nhau để giải quyết đụng độ.
Tạo nhánh When create a new branch, a new folder will be create on server. Right-click to Working folder: TortoiseSVN -> Branch/Tag…
Kết hợp nhánh Merge a range of revision Reintergrate a branch Merge two different trees
THANK YOU For Your Time