1 CSE 303 Lecture 19 Version control and Subversion ( svn ) slides created by Marty Stepp

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.
1. What is Subversion? Why do we need CM? Basic concepts Repositories Options Setup Clients Options Setup Operation Troubleshooting Slide 2.
Version Control System (Sub)Version Control (SVN).
Version Control 1.  Version control (or revision control) is the term for the management of source files, and all of the intermediate stages as development.
Version Control System Sui Huang, McMaster University Version Control SystemSui Huang, McMaster University Version Control System -- base on Subversion.
David Notkin Autumn 2009 CSE303 Lecture 22 Subversion is an open source version control system. Social Implications Friday version control system.
2/6/2008Prof. Hilfinger CS164 Lecture 71 Version Control Lecture 7.
Using subversion COMP 2400 Prof. Chris GauthierDickey.
CS311 – Lecture 08 Outline Subversion (SVN) *All information taken from “SVN Book” O’Reilly Lecture 081CS Operating Systems I.
Version Control and Subversion Chris Coakley. Outline What is Version Control? Why use it? Using Subversion (SVN)
Microsoft Visual Source Safe 6.01 Microsoft Visual Source Safe (MVSS) Presented By: Rachel Espinoza.
Source Control Repositories for Enabling Team Working Svetlin Nakov Telerik Corporation
SubVersioN – the new Central Service at DESY by Marian Gawron.
1 CSE 390 “Lecture 11” Version control with Git slides created by Ruth Anderson, images from
Git for Version Control These slides are heavily based on slides created by Ruth Anderson for CSE 390a. Thanks, Ruth! images taken from
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.
Source Control Repositories for Team Collaboration: SVN, TFS, Git Svetlin Nakov Telerik Software Academy academy.telerik.com Manager Technical Training.
Subversion. What is Subversion? A Version Control System A successor to CVS and SourceSafe Essentially gives you a tracked, shared file system.
Source Control Repositories for Team Collaboration: SVN, TFS, Git.
The Design Workshop Introduction to Version Control 1.
Version Control with Subversion Quick Reference of Subversion.
With Mercurial and Progress.   Introduction  What is version control ?  Why use version control ?  Centralised vs. Distributed  Why Mercurial ?
Source Control Systems SVN, Git, GitHub SoftUni Team Technical Trainers Software University
Subversion Code Deployment LifeCycle August 2011.
Subversion (SVN) Tutorial for CS421 Dan Fleck Spring 2010.
Warmup A programmer’s wife tells him, “Would you mind going to the store and picking up a loaf of bread? Also, if they have eggs, get a dozen.” The programmer.
ITEC 370 Lecture 16 Implementation. Review Questions? Design document on F, feedback tomorrow Midterm on F Implementation –Management (MMM) –Team roles.
Object-Oriented Analysis & Design Subversion. Contents  Configuration management  The repository  Versioning  Tags  Branches  Subversion 2.
Version Control Menggunakan TortoiseSVN
(Sub)Version Control. 2 Keep large teams working on the same code Back up your work so you don't lose it all Compare changes to previous versions Revert.
Subversion (SVN) A Revision Control System Successor to CVS Carlos Armas Hervey Allen.
SENG 403 Tutorial 1 1SENG 403 – Winter Agenda Version Control Basics Subversion Basic actions in Subversion Some examples 2SENG 403 – Winter 2012.
CSE 219 Computer Science III CVS
Version Control with SVN Images from TortoiseSVN documentation
SECTION 2: CODE REASONING + PROGRAMMING TOOLS slides borrowed and adapted from Alex Mariakis and CSE 390a.
Version Control Reducing risk with version control Jon Austin
Sabriansyah R.A Version Control. The Repository Subversion adalah sistem tersentralisasi untuk informasi sharing Repository adalah pusat penyimpanan data.
12 CVS Mauro Jaskelioff (originally by Gail Hopkins)
Version Control System
Version Control and SVN ECE 297. Why Do We Need Version Control?
Introduction to Git Yonglei Tao GVSU. Version Control Systems  Also known as Source Code Management systems  Increase your productivity by allowing.
Version control and Subversion (svn)
CSE 374 Programming Concepts & Tools Hal Perkins Fall 2015 Lecture 16 – Version control and git.
Subversion (SVN) Tutorial for CS421 Dan Fleck Spring 2010.
Source Control Repositories for Enabling Team Working Doncho Minkov Telerik Corporation
NALINI S. NAUTIYAL SYSTEM SOFTWARE DIVISION Subversion.
DIGITAL REPOSITORIES CGDD Job Description… Senior Tools Programmer – pulled August 4 th, 2011 from Gamasutra.
1 Subversion Kate Hedstrom April Version Control Software System for managing source files –For groups of people working on the same code –When.
Problem Solving With C++ SVN ( Version Control ) April 2016.
GIT Version control. Version Control Sharing code via a centralized DB Also provides for Backtracking (going back to a previous version of code), Branching.
Source Control Dr. Scott Schaefer. Version Control Systems Allow for maintenance and archiving of multiple versions of code / other files Designed for.
CSE 390 Lecture 9 Version control and Subversion (svn)
Version Control CS These slides were created by Kevin Schenk, BS in Computer Science, Purdue University, 2012.
Version Control with Subversion
SVN intro (review).
Source Control Dr. Scott Schaefer.
Version Control CS These outstanding slides were created by Kevin Schenk, BS in Computer Science, Purdue University, 2012.
Version control and Subversion (svn)
Concurrent Version Control
Version Control System
slides borrowed and adapted from Alex Mariakis and CSE 390a
Subversion Basics Guide
CSE 390 Lecture 9 Version control and Subversion (svn)
CSE 390 Lecture 9 Version control and Subversion (svn)
Version control and Subversion (svn)
Version control and Subversion (svn)
Version control and Subversion (svn)
Presentation transcript:

1 CSE 303 Lecture 19 Version control and Subversion ( svn ) slides created by Marty Stepp

2 Working in teams  Whose computer stores the "official" copy of the project? Can we store the project files in a neutral "official" location?  Will we be able to read/write each other's changes? Do we have the right file permissions?  What happens if we both try to edit the same file?  What happens if we make a mistake and corrupt an important file? Is there a way to keep backups of our project files?  How do I know what code each teammate is working on?

3 Recall: Groups and users setting groups on files: chgrp group filename chgrp -R cse303k * (set group of all to cse303k ) permission codes: chmod who(+-)what filename chmod -R g+rwX * (group can read/write all) commanddescription chmod change permissions for a file umask set default permissions for new files groups list the groups to which a user belongs chgrp change the group associated with a file

4 Version control version control system: Software that tracks and manages changes to a set of source code files and resources.  examples: CVS, Subversion (SVN), Git, Monotone, BitKeeper, Perforce helps teams to work together on code projects  a shared copy of all code files that all users can access  keeps current versions of all files, and backups of past versions  can see what files others have modified and view the changes  manages conflicts when multiple users modify the same file  not particular to source code; can be used for papers, photos, etc. but often works best with plain text/code files

5 Repositories repository: Central location storing a copy of all files.  check in: adding a new file to the repository  check out: downloading a file from the repo to edit it you don't edit files directly in the repo; you edit a local working copy once finished, the user checks in a new version of the file  commit: checking in a new version of a file(s) that were checked out  revert: undoing any changes to a file(s) that were checked out  update: downloading the latest versions of all files that have been recently committed by other users

6 Subversion Subversion: created to repair problems with older CVS system  supports folders, better renaming, atomic commits, good branching  currently the most popular free open-source version control system installing in Ubuntu: $ sudo apt-get install subversion creating a repository: $ svnadmin create path commanddescription svnadmin make administrative changes to an SVN repository svn interact with an SVN repository

7 SVN commands commanddescription svn add files schedule files to be added at next commit svn ci [files] commit / check in changed files svn co files check out svn help [command] get help info about a particular command svn import directory adds a directory into repo as a project svn merge source path merge changes svn revert files restore local copy to repo's version svn resolve source path resolve merging conflicts svn update [files] update local copy to latest version others: blame, changelist, cleanup, diff, export, ls/mv/rm/mkdir, lock/unlock, log, propset

8 Setting up a repo on attu, create the overall repository:  $ svnadmin create path from attu, add initial files into the repo (optional):  $ svn import projectname foldername give the repo read/write permissions to your cse303 group  $ chgrp -R mycse303group repofoldername  $ chmod -R g+rwX,o-rwx repofoldername

9 Adding files to a repo on your computer, set up a local copy of the repo  $ svn co svn+ssh://attu.cs.washington.edu/foldername  or, if you're setting up your local copy on attu as well: $ svn co file:///homes/iws/username/foldername  after checkout, your local copy "remembers" where the repo is now copy your own files into the repo's folder and add them:  $ svn add filename  common error: people forget to add files (won't compile for others) added files are not really sent to server until commit  $ svn ci filename -m "checkin message"  put source code and resources into repo (no.o files, executables)

10 Committing changes updating (to retrieve any changes others have made):  $ svn update examining your changes before commit:  $ svn status  $ svn diff filename  $ svn revert filename committing your changes to the server:  $ svn ci -m "added O(1) sorting feature"

11 Shell/IDE integration Linux: NautilusSVN Windows: TortoiseSVN Eclipse: Subclipse

12 Merging and conflicts merge: Two sets of changes applied at same time to same files  happens when two users check out same file(s), both change it, and: both commit, or one changes it and commits; the other changes it and does an update conflict: when the system is unable to reconcile merged changes  resolve: user intervention to repair a conflict. Possible ways: combining the changes manually in some way selecting one change in favor of the other reverting both changes (less likely)

13 Branches branch (fork): A second copy of the files in a repository  the two copies may be developed in different ways independently  given its own version number in the version control system  eventually be merged  trunk (mainline, baseline): the main code copy, not part of any fork