JavaEdge 2008: Your next version control system
Upcoming SlideShare
Loading in...5
×
 

JavaEdge 2008: Your next version control system

on

  • 1,687 views

The next generation of VCS has a clear target ahead of them: making branching and merging easier. Until recently, Subversion was dominating the world of Version Control Systems, but now, Distributed ...

The next generation of VCS has a clear target ahead of them: making branching and merging easier. Until recently, Subversion was dominating the world of Version Control Systems, but now, Distributed Version Control Systems are growing in popularity and everywhere you go you hear about Git or Mercurial, and how they make branching and merging a breeze. But the Subversion team isn't going down quietly, they have a new weapon: the 1.5 version. Learn about the next generation of Version Control Systems is planning to solve your problems.

Statistics

Views

Total Views
1,687
Views on SlideShare
1,681
Embed Views
6

Actions

Likes
0
Downloads
4
Comments
0

2 Embeds 6

http://www.linkedin.com 5
http://www.docseek.net 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    JavaEdge 2008: Your next version control system JavaEdge 2008: Your next version control system Presentation Transcript

    • 1
      Your next Version Control System
      Gilad Garon
      December 18th 2008
    • Agenda
      Introduction
      Branching
      Merging
      Subversion 1.5
      Distributed Version Control
      2
    • Introduction
      What’s every VCS user worst nightmare?
      Nope. It’s…
      3
    • Agenda
      Introduction
      Branching
      Merging
      Subversion 1.5
      Distributed Version Control
      4
    • Development Cycle
      Our repository layout should behave like our development cycle:
      Development Phase
      Testing Phase
      Release Final Product
      Our VCS should accommodate us and not the other way, no matter what’s our development process.
      5
    • Single Development Line
      One branch holds all phases of the develop cycle.
      6
    • Development Line with Support Line
      7
      Pros
      Cons
    • Development Line with Support Line
      One branch holds our development code.
      A second branch holds our production code for continued support.
      8
    • Development Line with Support Line
      9
      Pros
      Cons
    • Three Level Build
      A classic layout for a three phase development cycle.
      Release candidates are for the testing phase and support phase.
      The production branch is sterile.
      10
    • Development Line with Support Line
      11
      Pros
      Cons
    • Multiple Feature Support Build #1
      Feature branches allow for even more code separation on complex projects
      12
    • Multiple Feature Support Build #2
      13
      • Release Candidates can be closed when development cycle is complete
    • Development Line with Support Line
      14
      Pros
      Cons
    • Branching is good for you
      Branches are great for code separation.
      Branches are cheap
      Branches are easy to createSo, what’s the catch?
      15
    • Agenda
      Introduction
      Branching
      Merging
      Subversion 1.5
      Distributed Version Control
      16
    • Merging
      What the?!
      Override everything!
      Seems Familiar?
      17
    • Why merges are hard?
      Requires knowledge of the code
      Resolving conflicts by hand takes time
      Large projects require some planning
      Can cause logical bugs which aren’t easily detected
      18
    • Making merges easier
      Merge daily!
      Let the VCS do the merge for you
      Don’t merge at the last minute, allocate merging time in your time table.
      Keep tabs on your code, keep notes on your changes.
      19
    • Merge Tracking
      • Merge tracking means that the VCS remembers what was merged and when.
      • No more revision calculations
      • Cherry Pick your changes
      • See incoming changes
      • Refactor code without fear
      My Hero!
      20
    • Common Myths
      • Branching is easy?
      • Merges are hard?
      • Daily merges helps?
      • Automatic merges are dangerous?
      • Merging takes days of preparation?
      21
    • Agenda
      Introduction
      Branching
      Merging
      Subversion 1.5
      Distributed Version Control
      22
    • What’s New?
      Merge tracking
      Sparse checkouts
      Interactive conflict resolution
      Changelist support
      Speed improvements, cancellation response improvements
      Bug Fixes
      23
    • Merge Tracking
      Create a branch
      Work on your branch
      Update your branch with trunk’s changes
      svn copy http://yourserver.com/svn/project-x/trunk http://yourserver.com/svn/project-x/branches/feature-z -m "Creating a feature branch of /project-x/trunk."
      svn checkout http://yourserver.com/svn/project-x/branches/feature-z… work …svn commit - m “committing my work."
      svn merge http://yourserver.com/svn/project-x/trunk --- Merging r20 through r45 into '.': U GridView.java
      24
    • Merge Tracking
      What has been merged so far?
      Which changes are available from trunk?
      svn propget svn:mergeinfo . /trunk:20-45
      # or
      svn mergeinfo http://yourserver.com/svn/project-x/trunk r20r21…r44r45
      svn mergeinfo http://yourserver.com/svn/project-x/trunk --show-revs eligible r46r47
      25
    • Merge Tracking
      Merging back your branch:
      What’s the catch?
      No support for renames moves
      Mergeinfo is sometimes generated when no merge was done
      $ cd /workspace/project-x/trunk$ svn merge --reintegrate http://yourserver.com/svn/project-x/branches/feature-z--- Merging differences between repository URLs into '.': … changes list …# build, test, verify, ... $ svn commit -m “Merging feature-z back into trunk!"
      26
    • More New Features
      Sparse checkouts
      Interactive conflict resolution
      Changelist support
      $ svn checkout URI --depth=[empty,files,immediates,infinity]# command support - checkout, switch, update, status, info
      $ svn up U project-x/trunk/GridView.javaConflict discovered in 'project-x/trunk/GridView.java'.Select: (p) postpone, (df) diff-full, (e) edit, (s) show all options:
      $ svn changelist bug-fix-1 GridView.javaPath 'GridView.java' is now a member of changelist 'bug-fix-1'.$ svn status --- Changelist ‘bug-fix-1': M GridView.java
      27
    • Upgrading to Subversion 1.5 Server
      Backup everything
      Install Subversion 1.5 Server
      Upgrade existing repositories with:
      Populate indexes (Optional):
      Upgrade clients
      Pray to god
      28
      $ svnadmin upgrade REPOS_PATH
      $ svn-populate-node-origins-index REPOS-PATH
    • TortoiseSVN 1.5
      29
      TortoiseSVN is upgraded to support Subversion 1.5
      The Merge process is simplified and merge tracking is supported
      The repository now more resembles the Windows explorer
      Changelist support is supported
      Hook Scripts and Issue Trackers are supported
    • TortoiseSVN 1.5 Merge
      30
    • New Feature Compatibility Table
      31
    • Agenda
      Introduction
      Branching
      Merging
      Subversion 1.5
      DistributedVersion Control
      32
    • What is DVCS?
      Distributed VCS does NOT mean the physical distribution of the repository over several machines.
      Distributed VCS means the repository is located on your machine.
      33
    • Terminology
      In DVCS we…
      Do not check out from the repository, we clonethe repository.
      Do not update our working copy, we pullchanges from other repositories.
      Do not check in our changes,we pushchanges to other repositories.
      34
    • Advantages
      You are the repository
      Performance, no network overhead.
      Work offline, work where ever you want.
      Experiment, no commit rights required.
      Local Commits, the repository is in your workspace.
      Flexible repository topology
      35
    • Disadvantages
      But…
      Sparse checkouts are not fully supported if at all.
      Most vendors do not support branching, you must clone.
      Merge Tracking needs to mature a bit.
      More suited to Open Source projects than commercial.
      36
    • Centralized Workflow
      37
    • Decentralized Workflow
      38
    • Decentralized with shared mainlineWorkflow
      39
    • Decentralized with GatekeeperWorkflow
      40
    • Git
      • Project started on April 2005
      • Invented by Linus Torvalds to replace BitKeeper
      • Toolkit design
      • Used in - Linux Kernel, VLC, Ruby On Rails, Fedora, Android
      • IDE Support - Eclipse, NetBeansIntelliJ (Native)
      Subversion is the devil, use Git.
      41
    • Git Shell
      42
    • Gitk
      43
    • Git Pros & Cons
      44
      Pros
      Cons
    • Bazaar
      • Project started on March 2005
      • Started as a branch of Arch
      • Sponsored by Canonical (Ubuntu)
      • Used in - Ubuntu, MySQL, Drupal, APT, Linux Foundation
      • IDE Support - Eclipse, IntelliJ (Native)
      45
    • Tortoise Bazaar
      46
    • Bazaar Pros & Cons
      47
      Pros
      Cons
    • Mercurial
      • Project started on April 2005
      • Very Similar to Subversion
      • Adopted by Sun Microsystems
      • Used in - Mozilla, NetBeans, OpenJDK, OpenSolaris
      • IDE Support - Eclipse, NetBeans,IntelliJ
      48
    • Mercurial Serve
      49
    • Tortoise Mercurial
      50
    • Mercurial Pros & Cons
      51
      Pros
      Cons
    • Comparison
      52
    • Conclusion
      And the Winner is?
      Experiment with the tools
      Choose the tool which works with your workflow
      53
    • References
      Subversion
      Home Page: http://subversion.tigris.org/
      Tortoise: http://tortoisesvn.tigris.org/
      SVNKit: http://svnkit.com/
      Eclipse Plug-in: http://subclipse.tigris.org/
      NetBeans Plug-in: http://subversion.netbeans.org/
      Git
      Home Page: http://git.or.cz/
      msysgit (Git Windows) : http://code.google.com/p/msysgit/
      Eclipse Plug-in: http://git.or.cz/gitwiki/EclipsePlugin
      NetBeans Plug-in: http://code.google.com/p/nbgit/
      54
    • References
      Mercurial
      Home Page: http://www.selenic.com/mercurial/wiki/
      TortoiseHG: http://www.selenic.com/mercurial/wiki/index.cgi/TortoiseHg
      Eclipse Plug-in: http://www.vectrace.com/mercurialeclipse
      Bazaar
      Home Page: http://bazaar-vcs.org/
      IDE Plug-ins: http://bazaar-vcs.org/IDEIntegration
      55
    • Thank
      You !
      56