Prepared by: Steve Teo Contributors: Tong Huu Khiem.

Slides:



Advertisements
Similar presentations
TortoiseSVN By Group 1 Team B. Installing TortoiseSVN.
Advertisements

Intro to Version Control Have you ever …? Had an application crash and lose ALL of your work Made changes to a file for the worse and wished you could.
 Please sit next to your partner.  If you don’t have a partner, please find one now.
Version Control System (Sub)Version Control (SVN).
© 2010 Delmar, Cengage Learning Chapter 1 Getting Started with Dreamweaver.
MODULE 4 File and Folder Management. Creating file and folder A computer file is a resource for storing information, which is available to a computer.
Windows XP Basics OVERVIEW Next.
David Notkin Autumn 2009 CSE303 Lecture 22 Subversion is an open source version control system. Social Implications Friday version control system.
Concepts of Version Control A Technology-Independent View.
Using subversion COMP 2400 Prof. Chris GauthierDickey.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 12: Managing and Implementing Backups and Disaster Recovery.
Hands-On Microsoft Windows Server 2003 Administration Chapter 5 Administering File Resources.
What is so good about Archie and RevMan 5
Getting Started with GIT. Basic Navigation cd means change directory cd.. moves you up a level cd dir_name moves you to the folder named dir_name A dot.
Version Control with Subversion. What is Version Control Good For? Maintaining project/file history - so you don’t have to worry about it Managing collaboration.
Computer Literacy BASICS: A Comprehensive Guide to IC 3, 5 th Edition Lesson 3 Windows File Management 1 Morrison / Wells / Ruffolo.
Version control with Github August 26th, 2014 Daniel Schreij VU Cognitive Psychology departement
Create Database Tables
The Design Workshop Introduction to Version Control 1.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 12: Managing and Implementing Backups and Disaster Recovery.
A primer on version control at OTN
With Mercurial and Progress.   Introduction  What is version control ?  Why use version control ?  Centralised vs. Distributed  Why Mercurial ?
Subversion Code Deployment LifeCycle August 2011.
Subversion (SVN) Tutorial for CS421 Dan Fleck Spring 2010.
Git A distributed version control system Powerpoint credited to University of PA And modified by Pepper 8-Oct-15.
Version control Using Git Version control, using Git1.
…using Git/Tortoise Git
Git workflow and basic commands By: Anuj Sharma. Why git? Git is a distributed revision control system with an emphasis on speed, data integrity, and.
Object-Oriented Analysis & Design Subversion. Contents  Configuration management  The repository  Versioning  Tags  Branches  Subversion 2.
SUSE Linux Enterprise Desktop Administration Chapter 6 Manage Software.
Using Subversion and TortoiseSVN for Windows by Galen Wilkerson Gund Institute for Ecological Economics University of Vermont
DireXions – Your Tool Box just got Bigger PxPlus Version Control System Using TortoiseSVN Presented by: Jane Raymond.
Lesson 11: Looking at Files and Folders what a file or folder is on the computer how to recognize a file or folder on the desktop how to recognize the.
Team 708 – Hardwired Fusion Created by Nam Tran 2014.
CSE 219 Computer Science III CVS
An Introduction to Designing and Executing Workflows with Taverna Aleksandra Pawlik materials by: Katy Wolstencroft University of Manchester.
Computing Fundamentals Module Lesson 10 — File Management with Windows Explorer Computer Literacy BASICS.
Lesson 12: Using the Recycle Bin deleting files or folders what the Recycle Bin is restoring files from the Recycle Bin emptying the Recycle Bin identifying.
May 7, We manage documents and their changes with versioning and check out/check in procedures.
Revision Control with TortoiseHg (Team use) Team usage Prepared by: Steve Teo Contributors: Tong Huu Khiem CS2103 – Software Engineering.
Refactoring and Synchronization with the StarTeam Plug-in for Eclipse  Jim Wogulis  Principal Architect, Borland Software Corporation.
Practical PC, 7 th Edition Chapter 4: File Basics.
Prepared by: Steve Teo Contributors: Tong Huu Khiem.
1 CSE306 Operating Systems Projects CVS/SSH tutorial.
WinCvs. WinCVS WinCvs is a window based version control system. Use WinCvs when  You want to save every version of your file you have ever created. CVS.
When collaborating, it is important to manage changes in the models. For example: –To create or edit a submodel E.g. Habitat suitability is replaced with.
GIT.
L.T.E :: Learning Through Experimenting Using google-svn for MtM Docs Development Denis Thibault Version 3.2 Mar 12 th, 2009.
12 CVS Mauro Jaskelioff (originally by Gail Hopkins)
Introduction to Git Yonglei Tao GVSU. Version Control Systems  Also known as Source Code Management systems  Increase your productivity by allowing.
WinCVS Training è Basic Concepts è Download & Setup è Importing a new module into CVS Repository è Getting new module from CVS è Getting Latest version.
1 CSE 303 Lecture 19 Version control and Subversion ( svn ) slides created by Marty Stepp
TEAM FOUNDATION VERSION CONTROL AN OVERVIEW AND WALKTHROUGH By: Michael Mallar.
Subversion (SVN) Tutorial for CS421 Dan Fleck Spring 2010.
CACI Proprietary Information | Date 1 PD² SR13 Client Upgrade Name: Semarria Rosemond Title: Systems Analyst, Lead Date: December 8, 2011.
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Excel 2002 Using Macros Lesson.
© CGI Group Inc. User Guide Subversion client TortoiseSVN.
Git A distributed version control system Powerpoint credited to University of PA And modified by Pepper 28-Jun-16.
TechKnowlogy Conference August 2, 2011 Using GoogleDocs for Collaboration.
Problem Solving With C++ SVN ( Version Control ) April 2016.
Sharing and Synching files
Mercurial & TorToise-HG
Version Control System
An introduction to version control systems with Git
Getting Started with Git and Bitbucket
User Guide Subversion client TortoiseSVN
Microsoft Visual Source Safe How & Why
New Perspectives on Windows XP
Git CS Fall 2018.
Presentation transcript:

Prepared by: Steve Teo Contributors: Tong Huu Khiem

Before we begin… I am a note I am an instruction

Introduction to TortoiseHg TortoiseHg is an easy to use graphical client which integrates into the Windows Shell for the Mercurial Revision Control System (RCS) on the Windows operating system. Mercurial is also referred to by its short name Hg (see the connection?) TortoiseHg comes with Mercurial by default Download the latest version of TortoiseHg from

Objectives Learn basic concepts of Revision Control System (RCS) for individual use Know how to Create a local repository Add files to the repository Commit changes to the repository View differences between revisions Revert changes to files Label a revision for easy reference

After installation The explorer context menu will have two new commands. TortoiseHg allows for quick access to commonly used operations. Hg Workbench is a full-fledged application for interacting with repositories. We will focus on TortoiseHg for the purpose of this tutorial. Quick access to operations

What is a repository? The database where the files and historical data are stored, including the author of the changes and the summary of each change. Commonly called repo for short. Repository (Repo)

What is a working copy? The local directory of your files which you work on.

A basic overview Repository (Repo) Steve Version Control System Client Working Copy The set of files you are currently working on. Where files and historical data are stored uses works on Stores/retrieves monitors

Create a local repository When we create a repository, we specify a folder where the repository will be created in. In Mercurial, repositories can be created locally on your computer or on a remote server. Let us create a local repo. 2. Select “Create Repository Here” on the empty folder 1. Create an empty folder

Create a local repository The equivalent command using the command line Accept the default options and click “Create”

Create a local repository

The repository exists as a special hidden folder,.hg in the selected folder. The folder which was specified becomes the working copy itself. The local folder becomes the working copy The “.hg” directory is the repository.

Create a local repository Additional context menu commands will also be available once a folder has had a repository created within it More commands are available Commit command

Add files to the repository “add” tells the Version Control System to track a file, a set of files or a directory. Begin by creating new files in the directory. We need to ‘add’ these files so that they are tracked by Hg. Create these files

Add files to the repository Right-click on the folder and select the “Add Files…” command

Add files to the repository Preview of the contents of the selected file 1. Check the 3 files just created 2. Click “Add” to begin tracking the files for commit “?” status means unknown status, which means it has not been added into the repository

Add files to the repository Icon indication that the files have been added and are being tracked

Add files to the repository Alternatively, you can just right-click on the files to be added

What is a commit? commit command uploads a changed file or a set of changed files to the repository. It is similar to saying “take a snap shot of files at this time”. Repository (Repo) User Working Copy commit Stores snapshot TortoiseHg

What happens during a commit? Whenever a commit operation happens, files that have been changed with respect to the last commit will be detected. The user can then select which of these changed files are to be committed. The selected files will have their changes stored. During a single commit operation, the selected changes are grouped together into what is known as a “revision” and stored into the repository.

What is a revision? A revision is the set of changes whenever a commit is performed. Each revision is given a number. Every file change has a diff which shows the change to the particular file. Contains other important information such as the author of the changes and the summary of each change. Each successful commit will result in a new revision.

Commit changes to the repository Although the files have been added and are being tracked, they have not yet been committed. We need to commit so that changes to the files are saved by the repository. Right click on the directory and select the “Hg Commit…” command

Commit changes to the repository 2. Type a useful message that describes the commit 1. Select the files that are to be committed. Since this is the first commit, all the newly added files will be committed 3. Commit the changes Parent of the revision. Since it is the first commit, it will be -1 “A” status means it has been added

Commit changes to the repository After the commit, the screen will remain open. 4. Close the window Notice that the next commit will have the first commit as its parent.

Commit changes to the repository Notice the icon has changed for the files. The tick means that the file hasn’t been changed since the last stored commit in the repository. Select the “Update Icons” command to see the updated icon signs.

What is a diff? Diff is a file comparison utility that outputs the differences between two files Typically used to show the changes between one version of a file and a former version of the same file. Diff displays the changes made per line for text files. Revision Control Systems can display changes between files in the form of diff output or side-by-side comparisons using a ‘Visual Diff’ program.

An example of diff output Original line in document Going to be deleted Original line in document New second line Readme.txt (Original) Readme.txt (Modified) -1,2 +1,2 Original line in document -Going to be deleted \ No newline at end of file +New second line \ No newline at end of file Mercurial Diff Output How to read diff:

An example of diff output You can see the diff output when you commit changes. Diff output for readme.txt

Side-by-side diff comparison This red exclamation mark indicates the file has changed since the last Commit. Changes in files can be viewed side-by-side between the latest committed version and the new uncommitted version. Right-click on the changed file and then select the ‘Visual Diff’ command.

Side-by-side diff comparison TortoiseMerge is used by TortoiseHg to resolve conflicts and to visualize diffs between files. It makes it easy to resolve conflicts and analyze changes between files. This panel is the file content in the lastest commit This is the new content in the working directory

View differences between revisions 1. Right-click on the repository directory and select the “Hg Workbench” command

View differences between revisions List of Revisions List of files that were changed between Revision 5 and 4 Commit message for selected change set Diff output between revision 5 and 4 for “Readme.txt”

View differences between revisions Right-click on a revision and select the “Diff to local…” command to view a diff between it and the working copy

View differences between revisions Select two revisions (using control- click) and right click on them and select the “Visual Diff …” command

View differences between revisions 3. Double-click on the file to view the differences for that revision “misc.txt” in the earlier revision “misc.txt” in Working copy (or the later revision)

Revert changes to files Restore individual files or directories (in the working copy) to an earlier state, usually done if mistakes were made.

Revert changes to files Let us make some changes to misc.txt Notice the icon has changed for misc.txt. The exclamation mark indicates that the that the file has been changed.

Revert changes to files The changes were a mistake and we want to “revert” it. 1. Right click the directory and select the “Revert Files…” command Mercurial diff output 2. Proceed to “Revert” 2. Select the files to revert “M” status means it is modified

Revert changes to an earlier revision We can also revert changes of files to an earlier revision. 1. Make some additional changes to misc.txt and commit it 2. Select misc.txt 3. Select “Revision History”

Revert changes to an earlier revision 4. We are going to revert misc.txt back to revision 0. Right click revision 0 and select “Revert to revision…” Past commits

Revert changes to an earlier revision 5. Revert the file You can also revert all files back to this revision

Revert changes to an earlier revision We need to commit the revert to ensure that the changes are saved. Notice that misc.txt is modified. This is because it is now back to Rev 0, but the latest commit in the repository is actually Rev Commit one more time to ensure that the revert is saved.

Label a revision for easy reference In software development, it is good practice to label specific revisions as releases for commercial release to the public. In Mercurial, we can give specific revisions meaningful names such as Version 1.0 through tagging. 1. Right-click on the working copy and select “Hg Workbench” 2. Right-click a revision and select “Tag…” to tag it

Label a revision for easy reference 3. Enter the tag name 4. Add the tag name

Label a revision for easy reference Notice how a new revision is created. That’s right, tagging automatically introduces a new revision.

Summary Congratulations, you have learnt how to Create a local repository Add files to the repository Commit changes to the repository View differences between revisions Revert changes to files Label a revision for easy reference

Basic concepts of RCS (Individual use) ConceptDefinition Repository (Repo)The database where the files and historical data are stored, including the author of the changes and the summary of each change. Commonly called repo for short. Working CopyThe local directory of your files. CommitUploads a changed file or a set of changed files to the repository. RevisionA revision is the set of changes whenever a commit is performed. Each revision is given a number. AddTells the Version Control System to track a file, a set of files or a directory. These tracked files do not go into the repository until the next commit. RevertDiscards all changes in the working copy and use a specified revision from the repository. TagLabel a revision for easy reference.