Version control with Subversion how to set it up, use it, and save your sanity.

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.
1. What is Subversion? Why do we need CM? Basic concepts Repositories Options Setup Clients Options Setup Operation Troubleshooting Slide 2.
Let Use SVN(Subversion) Interaction Lab. Hyo-Geun Ahn
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.
Software Configuration Management Donna Albino LIS489, December 3, 2014.
Summer of Code (SOC) Presentation Fred R McClurg Girish H Mhatre Version Control Overview.
Version Control System Sui Huang, McMaster University Version Control SystemSui Huang, McMaster University Version Control System -- base on Subversion.
Revision Control Systems Amin Tootoonchian Kian Mirjalali.
Dedi Rahmawan Putra  Shared Document  Conventional Ways  Common Problems  What is TortoiseSVN  Advantages over another tools  Basic Concepts.
David Notkin Autumn 2009 CSE303 Lecture 22 Subversion is an open source version control system. Social Implications Friday version control system.
Version Control using Subversion Albert Young-Sun Kim November 2 nd, 2005 Available at entations/ subversion/
1 SVN – Tool for Version Control Talal Ahmed ( ) Ali Ahsan ( ) Adil Zia Khan ( ) Farid Ullah ( )
Subversion Takes Back the Night How Version Control makes web development better.
Low level CASE: Source Code Management. Source Code Management  Also known as Configuration Management  Source Code Managers are tools that: –Archive.
Damien Guard (BSc, MBCS) Guernsey Software Developer Forum Change management with Subversion.
Version Control at UCB Version control with Subversion and Subclipse.
Source Code Management Or Configuration Management: How I learned to Stop Worrying and Hate My Co-workers Less.
Source Control Repositories for Enabling Team Working Svetlin Nakov Telerik Corporation
SubVersioN – the new Central Service at DESY by Marian Gawron.
By Steven Campbell and Erik Boone.  Sharing projects by putting them into a central repository.  Checking out copies of projects from the repository.
Version Control. What is Version Control? Manages file sharing for Concurrent Development Keeps track of changes with Version Control SubVersion (SVN)
European Organization for Nuclear Research Source Control Management Service (Subversion) Brice Copy, Michel Bornand EN-ICE 13 May 2009.
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 Code Management with CVS Kurt Wiersma December 2004.
Source Control Repositories for Team Collaboration: SVN, TFS, Git.
The Design Workshop Introduction to Version Control 1.
The new version control system. Kiril Karaatanasov, July 2006 What is Subversion Subversion is a newly developed open source version control system Subversion.
Subversion, an Open Source Version Control System An Introduction.
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.
Subversion (SVN) Tutorial Source:
…using Git/Tortoise Git
Object-Oriented Analysis & Design Subversion. Contents  Configuration management  The repository  Versioning  Tags  Branches  Subversion 2.
Version Control Systems with Subversion (SVN) and Tortoise.
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.
Introduction to Version Control SE-2030 Dr. Rob Hasker 1 Based on material at and slides written.
SENG 403 Tutorial 1 1SENG 403 – Winter Agenda Version Control Basics Subversion Basic actions in Subversion Some examples 2SENG 403 – Winter 2012.
DireXions – Your Tool Box just got Bigger PxPlus Version Control System Using TortoiseSVN Presented by: Jane Raymond.
Computer Science and Engineering The Ohio State University  Widely used, especially in the opensource community, to track all changes to a project and.
Version Control with SVN Images from TortoiseSVN documentation
1 MSTE Visual SourceSafe For more information, see:
Sabriansyah R.A Version Control. The Repository Subversion adalah sistem tersentralisasi untuk informasi sharing Repository adalah pusat penyimpanan data.
Version Control and SVN ECE 297. Why Do We Need Version Control?
1 CSE 303 Lecture 19 Version control and Subversion ( svn ) slides created by Marty Stepp
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.
CS520 Web Programming Version Control with Subversion Chengyu Sun California State University, Los Angeles.
DIGITAL REPOSITORIES CGDD Job Description… Senior Tools Programmer – pulled August 4 th, 2011 from Gamasutra.
Version Control with Subversion
SVN intro (review).
Source Control Dr. Scott Schaefer.
Concurrent Version Control
Version Control System
Source Code Management
Revision Control Daniel Daugherty
Subversion Basics Guide
Concurrent Versions System
Systems Analysis and Design I
Version Control 101 with Subversion
Presentation transcript:

Version control with Subversion how to set it up, use it, and save your sanity

Introduction

My life reduced to bullets Designing / developing sites since 1996 Independent consultant Using ColdFusion since version 5 Using Fusebox since version 2 Using XHTML/CSS since 2003 Using Subversion off/on October 2006 –More off than on…

Version control in a nutshell Central Repository of all code and changes made to it by anyone over time Developers get the latest copy, edit, and “check it back in” to the repository Changes made to the same file by different developers are merged If need be, you can go back to a previous version of the code

Why version control at all? A “Time Machine” for code Accounts for all changes Makes multi-version management easier The ultimate “CYA” tool

Source control vs. version control Source Code Management –More of a “total solution” that includes things like bug tracking, Wiki Version Control / Revision Control –This is what Subversion does

Not just for code, by the way… Design comps Project documentation Recipes Drafts of memos, letters, novels Anything you want to revise over time

Not just for teams, by the way I use it for my own stuff Revert to the previous version if I screw up Not that I screw up Yep. What, what are you looking at?

Version Control Concepts The “steps” of version control

Version Control Steps Create a repository of project files (code) CHECKOUT a working copy of the code to working directory Edit code

Version Control Steps COMMIT your changes back into the repository If someone else changed the same file as you, resolve differences to the changed files as needed (MERGE) UPDATE your working copy before continuing work the next time

Version control models

File sharing: the problem to avoid

Lock-Modify-Unlock

Copy-Modify-Merge

Copy-Modify-Merge (cont’d)

Options A quick look at what else is out there…

Microsoft Visual Source Safe Microsoft doesn’t use this Can cause files to become lost, corrupted Slow, not designed to work over internet $500/developer (?)

Concurrent Versioning System (CVS) Released in 1986 Free, open source Relatively easy to use Designed for a team environment

CVS Limitations Cannot move/rename files in CVS Directory move/changes aren’t versioned Poor unicode support –Doesn’t support non-ASCII characters well No versioning of symbolic links Binary files are saved in their entirety

Other commercial VCS’s Perforce –Free for up to 2 users; OSS –$800 per developer seat SourceHaven –$295/developer seat

Subversion

About Subversion Designed to replace CVS Began in 2000 Self-hosting in in Feb 2004 Current version: 1.4.5

Subversion benefits Directory versioning Filename versioning Atomic commits – all succeed or all fail Metadata – keywords/comment Networking support

Subversion benefits (cont’d) Delta compression –Saves differences between files (even binary) Branching / Tagging Well-defined API (e.g., Trac, TortoiseSVN, SCPlugin) Free!

Installation Setting it up…

Access options

SVNServe Daemon Easy, quick install –1-click setup (ok, it takes more than 1 click) All projects under one repository –You can create sub projects under this main repository, but it’s less elegant than separate repositories Listens on nonstandard port (3690) –Across internet, there could be a firewall issue

SVNServe Daemon / 1-click setup Ideal if you want to get up and running quick to play with Subversion Not ideal if you want to version more than one project and/or work across a network

Apache, WebDAV/DeltaV Allows you to work with an SVN repository anywhere in the world Uses or on port 80 – no firewall issues! Use authentication to restrict to username/password holders

Subversion Repository

My Repository

Physical repository

Virtual repository

Revision history

One repository, multiple projects index.cfm dsp_header.cfm dsp_footer.cfm index.cfm dsp_header.cfm dsp_footer.cfm

One repository for each project index.cfm dsp_header.cfm dsp_footer.cfm index.cfm dsp_header.cfm dsp_footer.cfm

Interacting with Subversion Some approaches…

Command line interface General client command line svn [command ] [arguments ] Read or update your working copy svn checkout svn update Make changes svn add svn delete svn copy svn move Commit your changes svn commit

TortoiseSVN client

SCPlugin client

Subclipse

Using Subversion Simple steps to save your sanity

Using Subversion Create the repository Import files into repository Checkout files as a working copy Change, commit, update Resolve conflicts (if needed)

Using Subversion Demo

Branching

Branching notes Branches are for the minority –Use for trying out new features, etc. You may branch from trunk or from branch –But don’t unless you really need to Can merge changes from the branch to trunk or vice-versa Don’t be scared!

Using Subversion and CF Old Way –We all update files on a “dev server” New Way –Check out code to a local working directory –Develop locally –Commit changes back –Deploy “build” from SVN to dev server

Tips and Best Practices Use version control Don’t break the tree –Don’t commit broken code or code that is not finished Don’t lock files unless you have a durned good reason to Explain commits completely and in plain language (use diff!)

Tips and Best Practices (cont’d) Update early and often Commit early and often –without breaking build When in doubt, resolve conflicts with fellow team members Version the stuff you control, not the stuff your code produces Use one repository per project Subversion != Backup

Thank You!

Copyright Info All Diagrams from Version Control with Subversion available from Copyright (c) Ben Collins-Sussman, Brian W. Fitzpatrick, C. Michael Pilato. This work is licensed under the Creative Commons Attribution License. To view a copy of this license, visit or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305,USA.

Resources

Sites SVN Project – SVN Forum –

Utilities SVN 1-click setup – Tortoise SVN – Subclipse – CVS Dude –

Books Version Control with Subversion – Pragmatic Version Control with Subversion –

Articles on version control/branching Subversion for Windows & Apache – Setting up a Subversion Server under Windows – /Setting_up_a_Subversion_Server_under_Windows.aspxhttp://blogs.vertigosoftware.com/teamsystem/archive/2006/01/16 /Setting_up_a_Subversion_Server_under_Windows.aspx Subversion branching quick start – Source Control HOWTO –