0
2010
The Subversion Dilemma !
Check in buggy code and drive everyone else crazy
Avoid checking it in until it’s fully debugged
...
The Subversion Dilemma !
Weeks withoutVersion Control
Jens Schumacher – Atlassian
What is DVCS and why it will
change the way we work!
2010
Overview!
1. Mercurial vs. Subversion
2. Basic concepts
3. Use cases
Subversion vs Mercurial!
Subversion vs Mercurial!
Merging
Subversion vs Mercurial!
Branching
Subversion vs Mercurial!
Repository
Access
Subversion vs Mercurial!
Performance
Subversion vs Mercurial!
Sharing
Subversion vs Mercurial!
Tool Support
Subversion vs Mercurial!
Authentication
Subversion vs Mercurial!
Check Out
Subversion vs Mercurial!
Overview!
1. Mercurial vs. Subversion
2. Basic concepts
3. Use cases
Repository Architecture!
Subversion!
Mercurial!
Subversion!
Revisions
Subversion is always linear
Mercurial!
Changesets
head
Each Changeset can have multiple children
Mercurial!
head
head
Mercurial!
Pull
Merge
Mercurial!
"hg commit" adds a new node
"hg push" and "hg pull" transfer nodes in the
graph between two repositories
"hg me...
Branching in Mercurial!
•  Forks"
•  Named Branches"
•  Bookmarks"
•  Anonymous Branches"
Forks!
Forks!
•  Complete Isolation"
•  Very easy to discard"
•  Forking is slower"
Disadvantages"Advantages"
1 2
Forks!
When to use Forks"
•  When you donʼt have commit access"
•  To experiment"
•  For a build repository"
Named Branches!
Named Branches!
•  Branch Metadata"
•  Faster than Forking"
•  Branch Metadata"
•  Closing a Branch
(fixed in 1.2)"
Disadva...
Named Branches!
When to use Named Branches"
•  Working in a team on a feature"
Bookmarks!
Bookmarks!
•  Lightweight"
•  Can be deleted"
•  Similar to git"
•  Local (fixed in 1.6) "
•  Possible loss of context "
Di...
Bookmarks!
When to use Bookmarks"
•  Working in a team on a feature"
•  If you like to way git does branching"
•  If you u...
Anonymous Branches!
Anonymous Branches!
•  Fast "
•  No name required"
•  No closing required"
•  No description"
•  Changeset # required
(loo...
Anonymous Branches!
When to use Anonymous Branches"
•  For quick & small fixes"
Overview!
1. Mercurial vs. Subversion
2. Basic concepts
3. Use cases
BitBucket!
Mercurial code hosting"
•  Free for 5 users"
•  Unlimited public collaborators"
•  Unlimited disk space"
Getting Started!
The Basics!
hg init create a new repositoryhg commit save your
changes in the current repositoryhg log see all changes in
...
Separate Features!
Use Case
Work on several features in parallel
Separate Features!
$ hg clone project feature$ cd feature$
(do some changes and commits)
Clone
Separate Features!
$ cd ../project$ hg incoming ../feature
Incoming
Use hg incoming --patch to view the diffs
Separate Features!
$ hg pull ../feature
Pull
The history of feature one is now in your project.
However, changes are not y...
Separate Features!
$ hg merge
Merge
$ hg commit(enter commit message)
Commit
Separate Features!
Changesets
Collaborative Feature Development!
Use Case
Using Mercurial to help coordinate the coding
Collaborative Feature Development!
$ hg branch feature(do some changes)$ hg
commit(write commit message)
Create a branch
$...
Collaborative Feature Development!
$ hg update default$ hg merge feature$
hg commit(write commit message)
Merge the named ...
Collaborative Feature Development!
Changesets
Tagging Revisions!
Use Case
Release a plugin
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
Tagging Revisions!
Tags"
Overview!
1. Mercurial vs. Subversion
2. Basic concepts
3. Use cases
Try BitBucket!
bitbucket.org"
Links!
•  http://mercurial.selenic.com"
•  http://stevelosh.com/blog/2009/08/a-guide-to-
branching-in-mercurial"
•  http:/...
Thank you!!
AtlasCamp 2010: What is DVCS and why it will change the way we work - Jens Schumacher
Upcoming SlideShare
Loading in...5
×

AtlasCamp 2010: What is DVCS and why it will change the way we work - Jens Schumacher

1,431

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,431
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
12
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "AtlasCamp 2010: What is DVCS and why it will change the way we work - Jens Schumacher"

  1. 1. 2010
  2. 2. The Subversion Dilemma ! Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or
  3. 3. The Subversion Dilemma ! Weeks withoutVersion Control
  4. 4. Jens Schumacher – Atlassian What is DVCS and why it will change the way we work! 2010
  5. 5. Overview! 1. Mercurial vs. Subversion 2. Basic concepts 3. Use cases
  6. 6. Subversion vs Mercurial!
  7. 7. Subversion vs Mercurial! Merging
  8. 8. Subversion vs Mercurial! Branching
  9. 9. Subversion vs Mercurial! Repository Access
  10. 10. Subversion vs Mercurial! Performance
  11. 11. Subversion vs Mercurial! Sharing
  12. 12. Subversion vs Mercurial! Tool Support
  13. 13. Subversion vs Mercurial! Authentication
  14. 14. Subversion vs Mercurial! Check Out
  15. 15. Subversion vs Mercurial!
  16. 16. Overview! 1. Mercurial vs. Subversion 2. Basic concepts 3. Use cases
  17. 17. Repository Architecture!
  18. 18. Subversion!
  19. 19. Mercurial!
  20. 20. Subversion! Revisions Subversion is always linear
  21. 21. Mercurial! Changesets head Each Changeset can have multiple children
  22. 22. Mercurial! head head
  23. 23. Mercurial! Pull Merge
  24. 24. 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
  25. 25. Branching in Mercurial! •  Forks" •  Named Branches" •  Bookmarks" •  Anonymous Branches"
  26. 26. Forks!
  27. 27. Forks! •  Complete Isolation" •  Very easy to discard" •  Forking is slower" Disadvantages"Advantages" 1 2
  28. 28. Forks! When to use Forks" •  When you donʼt have commit access" •  To experiment" •  For a build repository"
  29. 29. Named Branches!
  30. 30. Named Branches! •  Branch Metadata" •  Faster than Forking" •  Branch Metadata" •  Closing a Branch (fixed in 1.2)" Disadvantages"Advantages"
  31. 31. Named Branches! When to use Named Branches" •  Working in a team on a feature"
  32. 32. Bookmarks!
  33. 33. Bookmarks! •  Lightweight" •  Can be deleted" •  Similar to git" •  Local (fixed in 1.6) " •  Possible loss of context " Disadvantages"Advantages"
  34. 34. 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"
  35. 35. Anonymous Branches!
  36. 36. Anonymous Branches! •  Fast " •  No name required" •  No closing required" •  No description" •  Changeset # required (lookup with hg log)" Disadvantages"Advantages"
  37. 37. Anonymous Branches! When to use Anonymous Branches" •  For quick & small fixes"
  38. 38. Overview! 1. Mercurial vs. Subversion 2. Basic concepts 3. Use cases
  39. 39. BitBucket! Mercurial code hosting" •  Free for 5 users" •  Unlimited public collaborators" •  Unlimited disk space"
  40. 40. Getting Started!
  41. 41. 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 di rectoryhg help <command>
  42. 42. Separate Features! Use Case Work on several features in parallel
  43. 43. Separate Features! $ hg clone project feature$ cd feature$ (do some changes and commits) Clone
  44. 44. Separate Features! $ cd ../project$ hg incoming ../feature Incoming Use hg incoming --patch to view the diffs
  45. 45. 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
  46. 46. Separate Features! $ hg merge Merge $ hg commit(enter commit message) Commit
  47. 47. Separate Features! Changesets
  48. 48. Collaborative Feature Development! Use Case Using Mercurial to help coordinate the coding
  49. 49. 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)
  50. 50. 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.
  51. 51. Collaborative Feature Development! Changesets
  52. 52. Tagging Revisions! Use Case Release a plugin
  53. 53. 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
  54. 54. Tagging Revisions! Tags"
  55. 55. Overview! 1. Mercurial vs. Subversion 2. Basic concepts 3. Use cases
  56. 56. Try BitBucket! bitbucket.org"
  57. 57. Links! •  http://mercurial.selenic.com" •  http://stevelosh.com/blog/2009/08/a-guide-to- branching-in-mercurial" •  http://hgbook.red-bean.com/"
  58. 58. Thank you!!
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×