1 / 31

Chapter2: Version Control

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

niran
Télécharger la présentation

Chapter2: Version Control

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter2: Version Control Student List: NguyễnLêQuốcSơn HuỳnhHữuTài LêAnhTân TrầnThanhThiện TrầnHoàngThịnh

  2. 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

  3. Table of Contents Introduction to Version Control Why is Version Control important? The Basic Concepts Version Control Tools Install and Demo

  4. 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.

  5. 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.

  6. The Basic Concepts Branch Checkout/Update Comment Commit Conflict Deltas Head Import Label Lock Merge Repository Resolve Revision Tag Trunk Working folder Workspace …

  7. 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.

  8. 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.

  9. 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.

  10. 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.

  11. 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.

  12. 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).

  13. 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.

  14. Version Control Tools

  15. Version Control Tools

  16. Version Control Tools

  17. Version Control Tools

  18. 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

  19. 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

  20. Create Repository Type the name of the repository and select check box if you want to use default structure for the repository

  21. Create User in VisualSVN

  22. User Authorization Folder or repository On defaulf, everyone can access the information Right-click on folder or Repository -> Properties

  23. User Authorization Permission level: - Inherit from parent - No access - Read only - Read/Write Add/Remove: user or group.

  24. 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 .

  25. TortoiseSVN – Check Log Log of changes of data with revision number, author, date ...

  26. 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

  27. File conflicts Mark: <<<<<<< filename Your changes ======= Code merged from repository >>>>>>>> revision File: Filename.ext.mine ,Filename.ext.rOLDREV, Filename.ext.rNEWREV

  28. 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 độ.

  29. 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…

  30. Kết hợp nhánh Merge a range of revision Reintergrate a branch Merge two different trees

  31. THANK YOU For Your Time

More Related