CSCB07 Software Design Version Control



Similar documents
Version Control with Subversion

Revision control systems (RCS) and

Version Control! Scenarios, Working with Git!

CSE 374 Programming Concepts & Tools. Laura Campbell (Thanks to Hal Perkins) Winter 2014 Lecture 16 Version control and svn

CPSC 491. Today: Source code control. Source Code (Version) Control. Exercise: g., no git, subversion, cvs, etc.)

CISC 275: Introduction to Software Engineering. Lab 5: Introduction to Revision Control with. Charlie Greenbacker University of Delaware Fall 2011

Version Control with Svn, Git and git-svn. Kate Hedstrom ARSC, UAF

Git Basics. Christopher Simpkins Chris Simpkins (Georgia Tech) CS 2340 Objects and Design CS / 22

Advanced Computing Tools for Applied Research Chapter 4. Version control

Work. MATLAB Source Control Using Git

Source Control Systems

Version control. HEAD is the name of the latest revision in the repository. It can be used in subversion rather than the latest revision number.

Continuous Integration. CSC 440: Software Engineering Slide #1

Version Control with Git. Dylan Nugent

Miguel A. Figueroa Villanueva Xabriel J. Collazo Mojica. ICOM 5047 Capstone Miguel A. Figueroa Villanueva University of Puerto Rico Mayagüez Campus

Annoyances with our current source control Can it get more comfortable? Git Appendix. Git vs Subversion. Andrey Kotlarski 13.XII.

Version Control with Git. Linux Users Group UT Arlington. Rohit Rawat

Software Configuration Management. Context. Learning Objectives

Version Control with. Ben Morgan

MATLAB & Git Versioning: The Very Basics

Git Basics. Christian Hanser. Institute for Applied Information Processing and Communications Graz University of Technology. 6.

Version Control Using Subversion. 12 May 2013 OSU CSE 1

CS108, Stanford Handout #33. CVS in Eclipse

Version Control. Luka Milovanov

Version Control with Subversion

Xcode Source Management Guide. (Legacy)

Theme 1 Software Processes. Software Configuration Management

Introduction to Programming Tools. Anjana & Shankar September,2010

Version control with Subversion

Version Control Tools

PKI, Git and SVN. Adam Young. Presented by. Senior Software Engineer, Red Hat. License Licensed under

Version Control with Git. Kate Hedstrom ARSC, UAF

UNIVERSITY OF CALIFORNIA Department of Electrical Engineering and Computer Sciences Computer Science Division. P. N. Hilfinger

Version control tracks multiple versions. Configuration Management. Version Control. V Software Engineering Lecture 12, Spring 2008

Automatic promotion and versioning with Oracle Data Integrator 12c

using version control in system administration

Version Control Tutorial using TortoiseSVN and. TortoiseGit

Version control. with git and GitHub. Karl Broman. Biostatistics & Medical Informatics, UW Madison

Subversion. Nadir SOUALEM. Linux Users subversion client svn or higher. Windows users subversion client Tortoise 1.6.

Version Control with Subversion and Xcode

Working with a Version Control System

Distributed Version Control with Mercurial and git

Using SVN to Manage Source RTL

Source code management systems

Software configuration management

An Introduction to Mercurial Version Control Software

Using Subversion in Computer Science

Version Control for Computational Economists: An Introduction

Version Control with Git

Introduction to the Git Version Control System

Version Control with Git

Software Engineering I (02161)

WORKING IN TEAMS WITH CASECOMPLETE AND MICROSOFT VISUAL SOURCE SAFE. Contents

CS 2112 Lab: Version Control

Introduction to Software Engineering (2+1 SWS) Winter Term 2009 / 2010 Dr. Michael Eichberg Vertretungsprofessur Software Engineering Department of

Using Git for Project Management with µvision

Introducing Xcode Source Control

Distributed Version Control

Introduc)on to Version Control with Git. Pradeep Sivakumar, PhD Sr. Computa5onal Specialist Research Compu5ng, NUIT

Beginning with SubclipseSVN

Software Engineering Process. Kevin Cathey

Application Lifecycle Management White Paper. Source Code Management Best Practice: Applying Economic Logic to Migration ALM

Continuous Integration

Version Uncontrolled! : How to Manage Your Version Control

[PRAKTISCHE ASPEKTE DER INFORMATIK WS 13/14]

Introduction to Version Control

Source Code Management/Version Control

CSE 70: Software Development Pipeline Build Process, XML, Repositories

Version Control Systems: SVN and GIT. How do VCS support SW development teams?

Git. A Distributed Version Control System. Carlos García Campos carlosgc@gsyc.es

Data management on HPC platforms

Software Configuration Management. Slides derived from Dr. Sara Stoecklin s notes and various web sources.

Using SVN to Manage Source RTL

"Code management in multi programmer environments."

Jazz Source Control Best Practices

Source Control and Team-Based Design in System Generator Author: Douang Phanthavong

BlueJ Teamwork Tutorial

Lab Exercise Part II: Git: A distributed version control system

Source Control Guide: Git

SPHOL207: Database Snapshots with SharePoint 2013

Introduction to Source Control ---

MOOSE-Based Application Development on GitLab

Introduction to Git. Markus Kötter Notes. Leinelab Workshop July 28, 2015

Global Software Change Management for PVCS Version Manager

Version Control Using Subversion. Version Control Using Subversion 1 / 27

WORKING IN TEAMS WITH CASECOMPLETE AND ACCUREV. Contents

Transcription:

CSCB07 Software Design Version Control Anya Tafliovich Fall 2015

Problem I: Working Solo How do you keep track of changes to your program? Option 1: Don t bother Hope you get it right the first time Hope you can remember what changes you made if you didn t (You probably won t get it right) (Or remember) (You will end up rewriting code)

Problem I: Working Solo Option 2: Periodically save backups Save snapshots of your program in another directory or under a different name E.g. Main.1.java, Main.2.java Or save it in a directory by date Problems: Totally ad hoc Only the programmer knows how to interpret the names Hard to pick a version to go back to Prone to error No tools to help you

Problem II: Working in a Team How do you coordinate who has the authority to change a file? Option 1: Worry about it after the fact Hey, why is this broken? My changes got overwritten! You weren t supposed to change that file! Option 2: Exchange email, phone calls, etc. Okay, I m going to work on A.java, so don t touch it.

Problem III: Moving around After a day of work in the lab, you want to go home and do some work at home in the evening. How do you know which files to copy to your home machine? Copy everything potentially slow might overwrite something you did at home, but forgot to copy from home to school Try to remember what changed highly likely to get it wrong Work in a cloud. Work on a removable storage device.

Version Control Two flavours: centralized and distributed. In this course, we study the centralized flavour. In CSCC01, CSCD01 we move to distributed.

Centralized Version Control Keep code in a central location ( repository ) This is the master copy Never directly modify this directory! Create a local copy of the repository in your account at school, on your machine at home, on your laptop... When the local copy changes, commit the changes to the repository.

Version Control tracking changes when working solo When you get something working, or you want to try something making sure you can revert to the current version, or for whatever other reason, commit the changes Tools allow you to revert to a previous version Write good log messages so that you don t have to remember what changed in each version

Version Control In this course we will use subversion, or svn There are other version control systems out there: CVS, Perforce, Microsoft Visual SorceSafe, etc. and newer, better, more complex ones, such as Mercurial and Git (which some of you will see in CSC C01) I bet the first company you end up working for uses a version control system.

subversion some common commands svn checkout [url] Get initial copy Do this anywhere to get a local copy of a repository. svn add [filenames] Add new files notifies Subversion that you want it to track the new files add will almost always be followed by a commit because add doesn t actually modify the repository svn status [filenames] See what s changed

subversion some common commands svn update [filenames] Synchronize with repository Copies stuff from the master repository to your local copy Any commits made by another person or commits done by you from another local copy will be updated in your local copy. Does not change the repository Watch the messages closely. svn commit [filenames] Commit local changes Copy changes to the repository Will only be allowed if the local copy is up to date Creates a new version

subversion some common commands svn remove [filenames] Remove files from repository Need to commit, just like for add, to make changes to the repository svn diff [filenames] Show diffs between local copy&repo Handy to see what changed between versions svn log [filenames] Show history of files Shows log message, timestamps and who made the revisions svn tree [filenames] Show history of files Shows log message, timestamps and who made the revisions

version control managing concurrency What if two (or more) people want to edit the same file at the same time? Option 1: prevent it Only allow one writeable copy of the file Pessimistic concurrency e.g., Microsoft Visual SourceSafe Option 2: patch up afterward Optimistic concurrency Easier to get forgiveness than permission e.g., Subversion, CVS, Perforce

version control optimistic concurrency [Work on the board.] Consider the following sequence of events: Alice and Bob share files A.txt and B.txt in the directory D using svn. Suppose Alice creates a file C.txt and modifies the file A.txt. She also creates a file D.txt, but she does not intend to share it. Also suppose Bob modifies the file B.txt. Provide a sequence of svn commands that will ensure that both Alice and Bob have the most recent versions of the files that are intended for sharing.

version control optimistic concurrency Terminology used in this example: Initially, Alice and Bob checked out the fresh copies of the repository. A file/ directory is tracked: svn monitors this file, examines it for changes, includes in the next commit, etc. To become tracked, a file needs to be added. Alice s file D.txt remains untracked.

DEMO. version control optimistic concurrency

version control optimistic concurrency [Work on the board.] What if Bob also modified file A.txt? Let us look at two different scenarios: 1. svn is able to merge without help from the user 2. conflict: (oh, no!) svn needs the user to resolve the conflict What if Bob also creates a file named C.txt? What if Alice creates a new directory newdir?

DEMO. version control optimistic concurrency

version control storage scheme Storing entire copy of a file on every change would require an enormous amount of disk space and would make synchronization slow. Version control systems store incremental differences. The incremental differences allow the system to reconstruct previous versions.

so where s my repo? You need to know the URL so you can do svn checkout [url] The repositories for this course all look like: http://markus.utsc.utoronto.ca/svn/cscb07f15/repo-id More instructions on what to check out and in when you need them!