2010. the subversion dilemma check in buggy code and drive everyone else crazy avoid checking it in...
TRANSCRIPT
![Page 1: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/1.jpg)
2010
![Page 2: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/2.jpg)
The Subversion Dilemma
Check in buggy code and drive everyone else crazy
Avoid checking it in until it’s fully debugged
or
![Page 3: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/3.jpg)
The Subversion Dilemma
Weeks without Version Control
![Page 4: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/4.jpg)
Jens Schumacher – AtlassianWhat is DVCS and why it will
change the way we work
2010
![Page 5: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/5.jpg)
Overview
1. Mercurial vs. Subversion 2. Basic concepts
3. Use cases
![Page 6: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/6.jpg)
![Page 7: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/7.jpg)
Subversion vs Mercurial
![Page 8: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/8.jpg)
Subversion vs Mercurial
Merging
![Page 9: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/9.jpg)
Subversion vs Mercurial
Branching
![Page 10: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/10.jpg)
Subversion vs Mercurial
Repository Access
![Page 11: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/11.jpg)
Subversion vs Mercurial
Performance
![Page 12: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/12.jpg)
Subversion vs Mercurial
Sharing
![Page 13: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/13.jpg)
Subversion vs Mercurial
Tool Support
![Page 14: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/14.jpg)
Subversion vs Mercurial
Authentication
![Page 15: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/15.jpg)
Subversion vs Mercurial
Check Out
![Page 16: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/16.jpg)
Subversion vs Mercurial
![Page 17: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/17.jpg)
Overview
1. Mercurial vs. Subversion 2. Basic concepts
3. Use cases
![Page 18: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/18.jpg)
Repository Architecture
![Page 19: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/19.jpg)
Subversion
![Page 20: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/20.jpg)
Mercurial
![Page 21: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/21.jpg)
Subversion
Revisions
Subversion is always linear
![Page 22: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/22.jpg)
Mercurial
Changesets
head
Each Changeset can have multiple children
![Page 23: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/23.jpg)
Mercurial
head
head
![Page 24: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/24.jpg)
Mercurial
Pull
Merge
![Page 25: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/25.jpg)
Mercurial
"hg commit" adds a new node
"hg push" and "hg pull" transfer nodes in the graph between two repositories
"hg merge" merge changes in a repository
![Page 26: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/26.jpg)
Branching in Mercurial
• Forks
• Named Branches
• Bookmarks
• Anonymous Branches
![Page 27: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/27.jpg)
Forks
![Page 28: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/28.jpg)
Forks
• Complete Isolation
• Very easy to discard
• Forking is slower
DisadvantagesAdvantages
1 2
![Page 29: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/29.jpg)
Forks
When to use Forks
• When you don’t have commit access
• To experiment
• For a build repository
![Page 30: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/30.jpg)
Named Branches
![Page 31: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/31.jpg)
Named Branches
• Branch Metadata
• Faster than Forking
• Branch Metadata
• Closing a Branch (fixed in 1.2)
DisadvantagesAdvantages
![Page 32: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/32.jpg)
Named Branches
When to use Named Branches
• Working in a team on a feature
![Page 33: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/33.jpg)
Bookmarks
![Page 34: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/34.jpg)
Bookmarks
• Lightweight
• Can be deleted
• Similar to git
• Local (fixed in 1.6)
• Possible loss of context
DisadvantagesAdvantages
![Page 35: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/35.jpg)
Bookmarks
When to use Bookmarks
• Working in a team on a feature
• If you like to way git does branching
• If you use Mercurial 1.6
![Page 36: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/36.jpg)
Anonymous Branches
![Page 37: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/37.jpg)
Anonymous Branches
• Fast
• No name required
• No closing required
• No description
• Changeset # required (lookup with hg log)
DisadvantagesAdvantages
![Page 38: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/38.jpg)
Anonymous Branches
When to use Anonymous Branches
• For quick & small fixes
![Page 39: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/39.jpg)
Overview
1. Mercurial vs. Subversion 2. Basic concepts
3. Use cases
![Page 40: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/40.jpg)
BitBucket
Mercurial code hosting
• Free for 5 users
• Unlimited public collaborators
• Unlimited disk space
![Page 41: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/41.jpg)
Getting Started
![Page 42: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/42.jpg)
The Basics
hg init create a new repositoryhg commit save your changes in the current repositoryhg log see all changes in your repositoryhg pull pull all changes from another repository into yourshg push push your changes into another repositoryhg merge join different lines of history
hg update update the repository's working directoryhg help <command>
![Page 43: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/43.jpg)
Separate Features
Use CaseWork on several features in parallel
![Page 44: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/44.jpg)
Separate Features
$ hg clone project feature$ cd feature$ (do some changes and commits)
Clone
![Page 45: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/45.jpg)
Separate Features
$ cd ../project$ hg incoming ../feature
Incoming
Use hg incoming --patch to view the diffs
![Page 46: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/46.jpg)
Separate Features
$ hg pull ../feature
Pull
The history of feature one is now in your project. However, changes are not yet visible and only stored in the .hg directory
![Page 47: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/47.jpg)
Separate Features
$ hg merge
Merge
$ hg commit(enter commit message)
Commit
![Page 48: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/48.jpg)
Separate Features
Changesets
![Page 49: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/49.jpg)
Collaborative Feature Development
Use CaseUsing Mercurial to help coordinate the coding
![Page 50: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/50.jpg)
Collaborative Feature Development
$ hg branch feature(do some changes)$ hg commit(write commit message)
Create a branch
$ hg update feature(do some changes)$ hg commit(write commit message)
![Page 51: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/51.jpg)
Collaborative Feature Development
$ hg update default$ hg merge feature$ hg commit(write commit message)
Merge the named branch
Named branches stay in history as permanent records after you finished your work.
![Page 52: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/52.jpg)
Collaborative Feature Development
Changesets
![Page 53: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/53.jpg)
Tagging Revisions
Use CaseRelease a plugin
![Page 54: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/54.jpg)
Tagging Revisions
$ hg tag -r 8 v0.1
Add a tag
$ hg tags
See all tags
$ hg update v0.1
Update to a tagged revision
![Page 55: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/55.jpg)
Tagging Revisions
Tags
![Page 56: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/56.jpg)
Overview
1. Mercurial vs. Subversion 2. Basic concepts
3. Use cases
![Page 57: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/57.jpg)
Try BitBucket
bitbucket.org
![Page 58: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/58.jpg)
Links
• http://mercurial.selenic.com
• http://stevelosh.com/blog/2009/08/a-guide-to-branching-in-mercurial
• http://hgbook.red-bean.com/
![Page 59: 2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or](https://reader035.vdocuments.us/reader035/viewer/2022062520/56649ec05503460f94bcad3b/html5/thumbnails/59.jpg)
Thank you!