Version Control. Kyungbaek Kim. Chonnam National University School of Electronics and Computer Engineering. Original slides from James Brucker

Similar documents
Subversion Repository Layout

Subversion. An open source version control system. W. Miah escience Rutherford Appleton Laboratory

Revision Control II. - svn

Subversion. Network Monitoring & Management

2/9/2013 LAB OUTLINE INTRODUCTION TO VCS WHY VERSION CONTROL SYSTEM(VCS)? II SENG 371 SOFTWARE EVOLUTION VERSION CONTROL SYSTEMS

Source control with Subversion A user perspective

Subversion. CS 490MT/5555, Fall 2015, Yongjie Zheng

Department of Computer Science College of Engineering Boise State University

Source Control. Comp-206 : Introduction to Software Systems Lecture 21. Alexandre Denault Computer Science McGill University Fall 2006

Version Control Systems

[Software Development] Development Tools. Davide Balzarotti. Eurecom Sophia Antipolis, France

Managing Source Code With Subversion

Revision control systems (RCS) and. Subversion

An Introduction to Subversion

2/8/18. Overview. Project Management. The First Law. What is Project Management? What Are These Changes? Software Configuration Management (SCM)

Yinghui Wang

Project Management. Overview

Source Code Management

Apache Subversion Tutorial

Software Tools Subversion

Common Configuration Management Tasks: How to Do Them with Subversion

Manage quality processes with Bugzilla

Introduction to Revision Control

CSE 390 Lecture 9. Version control and Subversion (svn)

Revision Control. Software Engineering SS 2007

Subversion FOUR. 4.1 What is Version Control? 4.2 What is Subversion? Types of Version Control SESSION

Revision control. INF5750/ Lecture 2 (Part I)

CVS. Computer Science and Engineering College of Engineering The Ohio State University. Lecture 21

12/7/09. How is a programming language processed? Picasso Design. Collaborating with Subversion Discussion of Preparation Analyses.

17008 VCS Subversion Version Control System

Certified Subversion Version Control Professional VS-1110

CSE 160: Introduction to Parallel Computation

TDDC88 Lab 4 Software Configuration Management

FCM and the UM Reading 9th November 2012

Version Control System. -- base on Subversion 1.4

CSE 374 Programming Concepts & Tools. Hal Perkins Winter 2012 Lecture 16 Version control and svn

VSO. Configuration Management

Revision Control. An Introduction Using Git 1/15

Home Page. Title Page. Contents. Page 1 of 17. Version Control. Go Back. Ken Bloom. Full Screen. Linux User Group of Davis March 1, Close.

CVS Application. William Jiang

Introduction to version control. David Rey DREAM

What is Subversion and what does it do?

1 ope. TortoiseSVN 1.7. Beginner's Guide. Perform version control in the easiest way with the. Lesley Harrison. best SVN client-tortoisesvn

Versioning. Jurriaan Hage homepage: Slides stolen from Eelco Dolstra.

CPSC 491. Lecture 19 & 20: Source Code Version Control. VCS = Version Control Software SCM = Source Code Management

Tutorial 2 GitHub Tutorial

CVS for Moodle Developers

Revision Control and GIT

Version Control. CSC207 Fall 2014

Installing Subversion on Windows

Reusable Component Management Through the Use of Subversion Externals. Who Am I?

What is git? Distributed Version Control System (VCS); Created by Linus Torvalds, to help with Linux development;

Part I Part 1 Version Control Systems (VCSs)

Part I Part 1 Version Control Systems (VCSs)

Part I Part 1 Version Control Systems (VCSs)

Part I Part 1 Version Control Systems (VCSs)

Version Control. Second level Third level Fourth level Fifth level. - Software Development Project. January 17, 2018

Part I Part 1 Version Control Systems (VCSs)

CSC 2700: Scientific Computing

Version Control Systems

Version Control. Second level Third level Fourth level Fifth level. - Software Development Project. January 11, 2017

Assembla & TortoiseSVN

February 2 nd Jean Parpaillon

Subversion Branching and Merging. Jan Skalický

Distributed Version Control

Securing Design Source Inside a Design Repository


Weak Consistency and Disconnected Operation in git. Raymond Cheng

Software Revision Control for MASS. Git Installation / Configuration / Use

CS108, Stanford Handout #37. Source Control CVS

Version Control. 1 Version Control Systems. Ken Bloom. Linux User Group of Davis March 1, 2005

Version Control System GIT

Push up your code next generation version control with (E)Git

Introduction to CVS. Sivan Toledo Tel-Aviv University

Introduction to distributed version control with git

Managing a WordPress 2.6 installation with Subversion. Sam Bauers - Automattic

Exercise 3: Adding a file to the master directory

USER GUIDE MADCAP LINGO Source Control: Git

Table of Contents: Tortoise SVN is used as a source control for FpML.

Chapter 3. Revision Control

CS2720 Practical Software Development

Git AN INTRODUCTION. Introduction to Git as a version control system: concepts, main features and practical aspects.

A Short Introduction to Subversion

Getting started with GitHub

USER GUIDE. MADCAP FLARE 2017 r3. Source Control: Git

Configuration Management

Topics covered. Introduction to Git Git workflows Git key concepts Hands on session Branching models. Git 2

CSE 391 Lecture 9. Version control with Git

Perforce for Subversion Users

b. Developing multiple versions of a software project in parallel

CSCI 2132: Software Development. Norbert Zeh. Faculty of Computer Science Dalhousie University. Subversion (and Git) Winter 2019

BLUEPRINT TEAM REPOSITORY. For Requirements Center & Requirements Center Test Definition

Computational Physics Compiling a C++ program

And check out a copy of your group's source tree, where N is your one-digit group number and user is your rss username

Version Control Systems

Computer Labs: Version Control with Subversion

Using RANCID. Contents. 1 Introduction Goals Notes Install rancid Add alias Configure rancid...

Lab 01 How to Survive & Introduction to Git. Web Programming DataLab, CS, NTHU

MNXB Working with SVN. Florido Paganelli Lund University Tutorial 2b

Apache Subversion (SVN)

Transcription:

Version Control Chonnam National University School of Electronics and Computer Engineering Kyungbaek Kim Original slides from James Brucker

What is version control Manage documents over time Keep a history of all changes Multiple versions of every file Coordinate work of multiple authors Avoid conflicts and help resolve them Permissions: authenticate and control access to files Show differences between versions of a file Document changes Reason for changes

How to use version control client checkout (first time) (do some work, test) check status update (resolve conflicts) commit (do more work, test) server send current revision ( n ) any changes since revision n? update your local copy with any changes in the repo. save your changes and log entry

Repository The server maintains a repository to store the version controlled data Clients check out copies of the data from the repository into its environment Working copies After making changes to working copies, clients commit changes to the repository After commit the revision number increases Other clients get these changes by updating their working copies

Repository Layout One repository, many projects Root Project 1 Project 2 trunk tags branches trunk tags branches One project per repository Repository parent dir Project 1 Project 2 trunk tags branches trunk tags branches Typically one repository per project Server can have an unlimited number of repositories

Inside of a Repository "KUClock" Project Repository revision 1 (initial repo structure) /var/svn/kuclock revision 4 revision 3 revision 2 revision 3: content diffs author date reason for change (comment) revision 2: initial project check-in...etc...

Revision numbers 0 1 2 3 Revision number is increased for every transaction that changes the repository.

Revisions User A checks out repository repo. repo/system.h 3 repo/system.cpp 3 User A modifies system.h and commits this file. repo/system.h 4 repo/system.cpp 3 User B commits changes to system.cpp, and A updates. repo/system.h 5 repo/system.cpp 5

Properties of a repository History of all changes to files and directories. you can recover any previous version of a file remembers "moved" and "deleted" files Access Control Read / write permission for users and groups Permissions can apply to repo, directory, or file Logging author of the change date of the change reason for the change

Logging a Revision Content Date Author Reason what has changed? when did it change? who changed it? why has it changed? SVN does this you enter this

Atomic commits A collection of modifications either goes into the repository completely, or not at all In other words, a commit will either altogether succeed, or it will altogether fail

Subversion Subversion is a version control system Usually called as SVN Subversion is well known and free Subversion fixes problems with CVS CVS : older version control system Subversion is being adopted as a replacement for CVS Subversion can manage any sort of file collection Not only source code

Subversion concepts checkout get a local copy of the files I have no files yet, how do I get them? add add a new file into the repository I created a new file and want to check it in commit send locally modified files to the repository I ve made changes, how do I send them to the group? update update all files with latest changes Other people made changes, how do I get them? tag / branch label a release I want to turn in a set of files

The Work Cycle of Subversion Create a local copy Submit your changes svn checkout svn update Make changes svn add svn move svn delete 100 Subversion Repository 106 105 svn commit Resolve conflicts (Merge your changes) svn diff svn resolved See what was changed in the repository in the meantime svn status -u Update your local copy svn update

Subversion Architecture Client Interface Repository Interface FSFS Apache GUI clients Cmd line clients Client Library Access Protocol DAV SVN SSH Intranetwork mod_dav mod_dav _svn svnserve sshd Subversion Repository Working Copy Management Library Local "file" protocol Berkley DB

How to create a repository Command Line svnadmin create repository_directory Graphical Tools Tortoise SVN Choose the option of creating repository here over a directory

How to contact a Subversion Server checkout (first time) client server 1. You need the URL of repository. http://se.cpe.ku.ac.th/svn/demo 2. (optional) may need a username and password.

URLs and Protocols http://myhost.com:port/path/to/repository Protocol: svn svn+ssh http https Host name or IP address 127.0.0.1 localhost host:8443 optional port number Repository relative path file

Examples of URLS http://altair.chonnam.ac.kr/svn/demo https://192.168.129.1:8080/svn/repo1 svn+ssh://user1@cam.kaist.ac.kr/svn/repo file:///home/user1/svn_test/repo

Checkout - Creating a working copy The client machine Repository Server Check out a "working copy"

Check Out List files in the repository svn list URL e.g., URL : file:///home/svn/repo/trunk Change the current directory to a suitable directory Check out the URL to a given directory name svn checkout URL Tips Don t check-out the entire repository Only check out the part that you need For developers, this is usually /repo/trunk For documenters, maybe /repo/doc

Checkout using TortoiseSVN Using windows Explore, right-click in a directory

Working copy.svn directory holds information of the repository and the working copy

Make changes You can add, move or delete files svn add file svn move src_file dest_file svn copy old_file new_file svn rename old_file new_file svn delete file Note : the commands work only in the working copy

Make changes using TortoiseSVN Results of changes

Commit changes You can commit your changes of working copy to the original copy at the repository svn ci [PATH]

Leave notes during commit

Update your working copy Before editing your work, check for updates in the repository Make your copy fresh svn up [PATH]

Update before editing You can not update your modification before update your working copy!!

Editing files You can edit files in your working repository If you have tortoisesvn, the explore indicates the change of your working copies Check your modification

Check the difference

What if conflicts happen? You can edit files, but Something might have changed while you were working Subversion requires you to synchronize before commit Conflict!! Means you have made changes to a file, and the version in the repository has been changed too

Resolving Conflicts Choices Merge local & remote changes into one file Accept remote, discard your local changes Override remote, use your local changes After resolving all conflicts, mark the file as resolved Subversion will delete the extra copies

SVN log viewer

export vs checkout export simply copy the target version of data svn [-r rev] URL [PATH] No.svn directory!!!

Import files Import : put the contents of a directory into the svn repository svn import [PATH] URL

Plan before you import Choose a directory layout for project and organize your copy src/ main/ java/ org/ myproject/ resources/ test/ java/... target/ classes/ site/ Source code Test code Build output, don't check-in to subversion

Plan before you import Decide what not to import Compiler output (*.class, *.obj, *.exe) Large image files, video, other data 3 rd party libraries you can get from Internet e.g. mysql-connector-5.1.jar.svnignore Put any file patterns and names of directories that you don t want to import into subversion

Ignore patterns 1. Through Setting 2. Individually adding

Tags Why do we need tags? Mark a release version of a product Mark a snapshot of the current development Typical Release names Release-0.1.2 major.minor.build(or revision) A tag name must be unique Contents of a tag should not be changed It depends on you!!

Tagging by Copy Root Project 1 trunk tags Release-1 Make references, not copy whole files

Branches This could happen to you You create a great product and it has been delivered to your customers Before you delivered the product you create a svn tag, named it Release-1.0.0 Your development team is modifying the trunk version with new features Customer reports that he found a major bug in your software

Branches You can keep developing the software And You create a branch to fix the bug RELEASE 1.0.0 BUGFIX_BRANCH RELEASE 1.0.1 Main line of development

Creating Branches Root Calc trunk Creating Branches is same to creating tags branches my-calc branch Paint trunk branches

Using branches : svn switch Switch the working copy in Trunk

Merging from a branch After fix the bug you need to merge the branched codes for further maintenance RELEASE 1.0.0 BUGFIX_BRANCH Merge back RELEASE 1.0.1

Merging from a branch

Branches vs tags The intention Tags : as read-only area Branches : as continue development area Technically you can use a tag to continue development and check in. But you should not do it!!