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

Like this? Share it with your network

Share

JavaEdge 2008: Your next version control system

  • 1,770 views
Uploaded on

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,......

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.

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
1,770
On Slideshare
1,764
From Embeds
6
Number of Embeds
2

Actions

Shares
Downloads
4
Comments
0
Likes
0

Embeds 6

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

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. 1
    Your next Version Control System
    Gilad Garon
    December 18th 2008
  • 2. Agenda
    Introduction
    Branching
    Merging
    Subversion 1.5
    Distributed Version Control
    2
  • 3. Introduction
    What’s every VCS user worst nightmare?
    Nope. It’s…
    3
  • 4. Agenda
    Introduction
    Branching
    Merging
    Subversion 1.5
    Distributed Version Control
    4
  • 5. 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
  • 6. Single Development Line
    One branch holds all phases of the develop cycle.
    6
  • 7. Development Line with Support Line
    7
    Pros
    Cons
  • 8. Development Line with Support Line
    One branch holds our development code.
    A second branch holds our production code for continued support.
    8
  • 9. Development Line with Support Line
    9
    Pros
    Cons
  • 10. 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
  • 11. Development Line with Support Line
    11
    Pros
    Cons
  • 12. Multiple Feature Support Build #1
    Feature branches allow for even more code separation on complex projects
    12
  • 13. Multiple Feature Support Build #2
    13
    • Release Candidates can be closed when development cycle is complete
  • Development Line with Support Line
    14
    Pros
    Cons
  • 14. Branching is good for you
    Branches are great for code separation.
    Branches are cheap
    Branches are easy to createSo, what’s the catch?
    15
  • 15. Agenda
    Introduction
    Branching
    Merging
    Subversion 1.5
    Distributed Version Control
    16
  • 16. Merging
    What the?!
    Override everything!
    Seems Familiar?
    17
  • 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
  • 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
  • 19. Merge Tracking
    • Merge tracking means that the VCS remembers what was merged and when.
    • 20. No more revision calculations
    • 21. Cherry Pick your changes
    • 22. See incoming changes
    • 23. Refactor code without fear
    My Hero!
    20
  • 24. Common Myths
    • Branching is easy?
    • 25. Merges are hard?
    • 26. Daily merges helps?
    • 27. Automatic merges are dangerous?
    • 28. Merging takes days of preparation?
    21
  • 29. Agenda
    Introduction
    Branching
    Merging
    Subversion 1.5
    Distributed Version Control
    22
  • 30. What’s New?
    Merge tracking
    Sparse checkouts
    Interactive conflict resolution
    Changelist support
    Speed improvements, cancellation response improvements
    Bug Fixes
    23
  • 31. 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
  • 32. 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
  • 33. 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
  • 34. 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
  • 35. 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
  • 36. 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
  • 37. TortoiseSVN 1.5 Merge
    30
  • 38. New Feature Compatibility Table
    31
  • 39. Agenda
    Introduction
    Branching
    Merging
    Subversion 1.5
    DistributedVersion Control
    32
  • 40. 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
  • 41. 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
  • 42. 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
  • 43. 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
  • 44. Centralized Workflow
    37
  • 45. Decentralized Workflow
    38
  • 46. Decentralized with shared mainlineWorkflow
    39
  • 47. Decentralized with GatekeeperWorkflow
    40
  • 48. Git
    • Project started on April 2005
    • 49. Invented by Linus Torvalds to replace BitKeeper
    • 50. Toolkit design
    • 51. Used in - Linux Kernel, VLC, Ruby On Rails, Fedora, Android
    • 52. IDE Support - Eclipse, NetBeansIntelliJ (Native)
    Subversion is the devil, use Git.
    41
  • 53. Git Shell
    42
  • 54. Gitk
    43
  • 55. Git Pros & Cons
    44
    Pros
    Cons
  • 56. Bazaar
    • Project started on March 2005
    • 57. Started as a branch of Arch
    • 58. Sponsored by Canonical (Ubuntu)
    • 59. Used in - Ubuntu, MySQL, Drupal, APT, Linux Foundation
    • 60. IDE Support - Eclipse, IntelliJ (Native)
    45
  • 61. Tortoise Bazaar
    46
  • 62. Bazaar Pros & Cons
    47
    Pros
    Cons
  • 63. Mercurial
    • Project started on April 2005
    • 64. Very Similar to Subversion
    • 65. Adopted by Sun Microsystems
    • 66. Used in - Mozilla, NetBeans, OpenJDK, OpenSolaris
    • 67. IDE Support - Eclipse, NetBeans,IntelliJ
    48
  • 68. Mercurial Serve
    49
  • 69. Tortoise Mercurial
    50
  • 70. Mercurial Pros & Cons
    51
    Pros
    Cons
  • 71. Comparison
    52
  • 72. Conclusion
    And the Winner is?
    Experiment with the tools
    Choose the tool which works with your workflow
    53
  • 73. 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
  • 74. 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
  • 75. Thank
    You !
    56