+ All Categories
Home > Technology > AtlasCamp 2010: What is DVCS and why it will change the way we work - Jens Schumacher

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

Date post: 23-Jan-2015
Category:
Upload: atlassian
View: 1,382 times
Download: 0 times
Share this document with a friend
Description:
 
59
2010
Transcript
Page 1: AtlasCamp 2010: What is DVCS and why it will change the way we work - Jens Schumacher

2010

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

The Subversion Dilemma !

Check in buggy code and drive everyone else crazy

Avoid checking it in until it’s fully debugged

or

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

The Subversion Dilemma !

Weeks without Version Control

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

Jens Schumacher – Atlassian What is DVCS and why it will change the way we work!

2010

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

Overview!

1.  Mercurial vs. Subversion

2.  Basic concepts

3.  Use cases

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

Subversion vs Mercurial!

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

Subversion vs Mercurial!

Merging

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

Subversion vs Mercurial!

Branching

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

Subversion vs Mercurial!

Repository Access

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

Subversion vs Mercurial!

Performance

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

Subversion vs Mercurial!

Sharing

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

Subversion vs Mercurial!

Tool Support

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

Subversion vs Mercurial!

Authentication

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

Subversion vs Mercurial!

Check Out

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

Subversion vs Mercurial!

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

Overview!

1.  Mercurial vs. Subversion

2.  Basic concepts

3.  Use cases

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

Repository Architecture!

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

Subversion!

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

Mercurial!

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

Subversion!

Revisions

Subversion is always linear

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

Mercurial!

Changesets

head

Each Changeset can have multiple children

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

Mercurial!

head

head

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

Mercurial!

Pull

Merge

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

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: AtlasCamp 2010: What is DVCS and why it will change the way we work - Jens Schumacher

Branching in Mercurial!

•  Forks"•  Named Branches"•  Bookmarks"•  Anonymous Branches"

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

Forks!

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

Forks!

•  Complete Isolation"•  Very easy to discard"

•  Forking is slower"

Disadvantages"Advantages"

1 2

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

Forks!

When to use Forks"

•  When you donʼt have commit access"•  To experiment"•  For a build repository"

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

Named Branches!

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

Named Branches!

•  Branch Metadata"•  Faster than Forking"

•  Branch Metadata"•  Closing a Branch

(fixed in 1.2)"

Disadvantages"Advantages"

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

Named Branches!

When to use Named Branches"

•  Working in a team on a feature"

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

Bookmarks!

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

Bookmarks!

•  Lightweight"•  Can be deleted"•  Similar to git"

•  Local (fixed in 1.6) "•  Possible loss of context "

Disadvantages"Advantages"

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

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: AtlasCamp 2010: What is DVCS and why it will change the way we work - Jens Schumacher

Anonymous Branches!

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

Anonymous Branches!

•  Fast "•  No name required"•  No closing required"

•  No description"•  Changeset # required

(lookup with hg log)"

Disadvantages"Advantages"

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

Anonymous Branches!

When to use Anonymous Branches"

•  For quick & small fixes"

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

Overview!

1.  Mercurial vs. Subversion

2.  Basic concepts

3.  Use cases

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

BitBucket!

Mercurial code hosting"

•  Free for 5 users"•  Unlimited public collaborators"•  Unlimited disk space"

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

Getting Started!

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

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: AtlasCamp 2010: What is DVCS and why it will change the way we work - Jens Schumacher

Separate Features!

Use Case Work on several features in parallel

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

Separate Features!

$ hg clone project feature$ cd feature$ (do some changes and commits)

Clone

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

Separate Features!

$ cd ../project$ hg incoming ../feature

Incoming

Use hg incoming --patch to view the diffs

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

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: AtlasCamp 2010: What is DVCS and why it will change the way we work - Jens Schumacher

Separate Features!

$ hg merge

Merge

$ hg commit(enter commit message)

Commit

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

Separate Features!

Changesets

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

Collaborative Feature Development!

Use Case Using Mercurial to help coordinate the coding

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

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: AtlasCamp 2010: What is DVCS and why it will change the way we work - Jens Schumacher

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: AtlasCamp 2010: What is DVCS and why it will change the way we work - Jens Schumacher

Collaborative Feature Development!

Changesets

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

Tagging Revisions!

Use Case Release a plugin

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

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: AtlasCamp 2010: What is DVCS and why it will change the way we work - Jens Schumacher

Tagging Revisions!

Tags"

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

Overview!

1.  Mercurial vs. Subversion

2.  Basic concepts

3.  Use cases

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

Try BitBucket!

bitbucket.org"

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

Links!

•  http://mercurial.selenic.com"•  http://stevelosh.com/blog/2009/08/a-guide-to-

branching-in-mercurial"•  http://hgbook.red-bean.com/"

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

Thank you!!


Recommended