Upload
lorna-mitchell
View
2.643
Download
0
Tags:
Embed Size (px)
Citation preview
Source ControlLandscape
Lorna Jane Mitchell
PHP London, October 2010
About Me
Lorna Jane Mitchell Freelance PHP consultant/developer/trainer Speaker and Writer Based in Leeds, UK (in town for FOWA) Homepage: http://lornajane.net Twitter: @lornajane
Source Control
Tool History Subversion The future: DVCS
4
Subversion (svn)
Creator CollabNet
URL http://subversion.apache.org
Maintainer Apache
Users PHPSourceforgeFreeBSDApache Software Foundation
License Apache/BSD style
Documentation Excellent, more matureRed Bean Book
5
Subversion: The Roapmap Taken from:
● http://lwn.net/Articles/381794/
Subversion exists to be universally recognized and adopted as an open-source, centralized version control system characterized by its reliability as a safe haven
for valuable data; the simplicity of its model and usage; and its ability to support the needs of a wide
variety of users and projects, from individuals to large-scale enterprise operations.
6
Git
Creator Linus Torvalds
URL http://git-scm.com/
Maintainer Junio Hamano
Users Linux kernelRuby on RailsCakePHPDebianGNOME
License GPL
Documentation "terse", a lot of documentation for an unfamiliar system
7
Bazaar (bzr)
Creator Martin Pool
URL http://bazaar.canonical.com/
Maintainer Canonical
Users UbuntuMySQLInkscapeSquid
License GPL
Documentation Excellent! Aimed at beginners, UI designed to be intuitive
8
Mercurial (hg)
Creator Matt Mackall
URL http://mercurial.selenic.com/
Maintainer Matt Mackall
Users MozillaOpenOffice.orgSymbianOSNetBeans
License GPL
Documentation Good, online book and command line help
9
Features Atomic commits File renames Symbolic links Pre/Post event hooks Merge tracking Tags EOL conversions
10
Protocols Everything supports SSH and HTTP(S) Distributed systems support email Bazaar supports FTP Git supports rsync
11
Centralised vs Distributed Source Control
12
Centralised Source Control Traditional model Subversion uses this Other products can do it
13
Centralised Source Control
14
Distributed Source Control
15
Distributed Source Control Same function as centralised source control Very different approach Steeper learning curve Key concepts
● local repositories● revisions● branching
16
Local Repository
Clone a whole repo It's FAST Can commit without sharing Can rewrite history
17
Snapshots vs Changesets From a Joel Spolsky post:
With distributed version control, the distributed part is actually not the most interesting part.
The interesting part is that these systems think in terms of changes, not in terms of versions
Snapshots vs Changesets
Subversion commit is a snapshot of the codebase
For a DCVS, it's a set of changes Makes it easier to share changes Can be applied in different orders Cherry-picking
Branching
Branches in DCVS are not just copies Working copy can switch between them Private branching
The Social Aspect
Hosted Code Solutions
Combat the complexity of DCVS Supporting tools e.g. GitHub
22
Code Hosting and Collaboration Provide repository space Repo browsing, linked projects Forums and mailing lists Wiki (or similar: launchpad has blueprints) Publish downloadable versions Message other collaborators
23
Code Hosting Providers
GitHubhttp://github.com/
git
Bitbuckethttp://bitbucket.org/
hg
Google Codehttp://code.google.com/
svn, hg
Launchpadhttps://launchpad.net/
bzr
SourceForgehttp://sourceforge.net/
svn, bzr, hg, git (and cvs)
Tools and Choices
Trac
Trac supports all mentioned products Code browsing Commit messages update issues
GUI Tools
Moving target! Improving IDE support Tortoise* products Limited support for git on windows
27
Building Bridges Bridge between SVN repo and local
● bzr-svn https://launchpad.net/bzr-svn
● git-svn http://www.kernel.org/pub/software/scm/git/docs/git-svn.html
Local distributed-style repo Communicates with central SVN server Pulls complete history
● diff, log fast and offline
Work offline, commit later
Access Control
SVN has granular access control Can use various apache mechanisms Control access by path DCVS are much newer, access control uses
hooks Can control writes What about reads?
29
Cost of Transition Steeper learning curve Implementation costs
● tool migration● process changes● supporting tool migration● user training (ongoing!)
Hype and dismissive attitudes are unhelpful
30
Making Choices Global team of expert geeks - use DCVS (any
one) Colocated team of mixed ability - use SVN Everything else is a sliding scale! Consider
● Your people● Your admins● The documentation, support and community of your
chosen solution
31
Any Questions?
Thanks!
@lornajane
http://lornajane.net