48
Distributed Version Control System gasolin@TWJUG 2010/12/24

Introduction of Distributed version control system (mainly Mercurial)

Embed Size (px)

DESCRIPTION

talk at TWJUG at 2010

Citation preview

Page 1: Introduction of Distributed version control system (mainly Mercurial)

Distributed Version Control System

gasolin@TWJUG 2010/12/24

Page 3: Introduction of Distributed version control system (mainly Mercurial)

你必須使用一個原始碼控制工具,否則你就會像缺了左膀右臂一樣

-- 編程創藝

Page 4: Introduction of Distributed version control system (mainly Mercurial)

Source Control

Page 5: Introduction of Distributed version control system (mainly Mercurial)

Version Control System

Page 6: Introduction of Distributed version control system (mainly Mercurial)

CVS

1990

Page 7: Introduction of Distributed version control system (mainly Mercurial)

SVN

2001

Page 8: Introduction of Distributed version control system (mainly Mercurial)
Page 9: Introduction of Distributed version control system (mainly Mercurial)

git

2005

Linux Kernel

Page 10: Introduction of Distributed version control system (mainly Mercurial)

hg

2005

Page 11: Introduction of Distributed version control system (mainly Mercurial)
Page 12: Introduction of Distributed version control system (mainly Mercurial)

What is Mercurial for?

Distributed Version Control System

Page 13: Introduction of Distributed version control system (mainly Mercurial)
Page 14: Introduction of Distributed version control system (mainly Mercurial)

Version Control Procedure

●Get source from repository●Modify source●Commit source

Page 15: Introduction of Distributed version control system (mainly Mercurial)

Version Control Procedure (Extra)

●Put source on repository●Deal with conflict●Offline development (DVCS)

Page 16: Introduction of Distributed version control system (mainly Mercurial)
Page 17: Introduction of Distributed version control system (mainly Mercurial)

hg Advantages

Page 18: Introduction of Distributed version control system (mainly Mercurial)

Cross platformWindows/Mac/Linux

Page 19: Introduction of Distributed version control system (mainly Mercurial)

Similar syntax

to svn

Page 20: Introduction of Distributed version control system (mainly Mercurial)

Not pollute namespacesave all in .hg

Page 21: Introduction of Distributed version control system (mainly Mercurial)

Tools Ready

http://cbes.javaforge.com/updateMercurialEclipse

TortoiseHghttp://tortoisehg.bitbucket.org/

Hudson Pluginhttp://wiki.hudson-ci.org/display/HUDSON/Mercurial+Plugin

http://code.google.com/hosting/

Page 22: Introduction of Distributed version control system (mainly Mercurial)

Hosts Ready:

http://code.google.com/hosting/

http://bitbucket.org/

Page 24: Introduction of Distributed version control system (mainly Mercurial)

Cloud Version Control

+http://db.tt/sJ60U6U

Page 25: Introduction of Distributed version control system (mainly Mercurial)
Page 26: Introduction of Distributed version control system (mainly Mercurial)

Hosting

Page 27: Introduction of Distributed version control system (mainly Mercurial)

Write Documents, Examples

Page 28: Introduction of Distributed version control system (mainly Mercurial)

Trace Issues, Bugs, Requessts

Page 29: Introduction of Distributed version control system (mainly Mercurial)

Version Control

Page 30: Introduction of Distributed version control system (mainly Mercurial)

Tagging new Version

Page 31: Introduction of Distributed version control system (mainly Mercurial)

Distributing(Place for Download)

Page 32: Introduction of Distributed version control system (mainly Mercurial)

Empower the Coderas Project Maintainer

Page 33: Introduction of Distributed version control system (mainly Mercurial)

While act as the User

Page 34: Introduction of Distributed version control system (mainly Mercurial)

Get a copy$ hg clone

LocalRemote

Page 35: Introduction of Distributed version control system (mainly Mercurial)

Update changes$ hg pull

LocalRemote

Page 36: Introduction of Distributed version control system (mainly Mercurial)

Update & Merge$ hg up

Local

Page 37: Introduction of Distributed version control system (mainly Mercurial)

While act as Developer

Page 38: Introduction of Distributed version control system (mainly Mercurial)

Start repository$ hg init

Local

Page 39: Introduction of Distributed version control system (mainly Mercurial)

Add control$ hg add [file/folder]

Local

Page 40: Introduction of Distributed version control system (mainly Mercurial)

Rename File$ hg addremove

Local

Page 41: Introduction of Distributed version control system (mainly Mercurial)

build-in web interface$ hg serve -p [port]

Local

Page 42: Introduction of Distributed version control system (mainly Mercurial)

Remove control$ hg rm [file/folder]

Local

Page 43: Introduction of Distributed version control system (mainly Mercurial)

Save to repository$ hg ci -m "message"

Local

Page 44: Introduction of Distributed version control system (mainly Mercurial)

Fork a branch$ hg branch [branch_name]

LocalRemote

Page 45: Introduction of Distributed version control system (mainly Mercurial)

Merge a branch$ hg up default$ hg merge [branch_name]

LocalRemote

Page 46: Introduction of Distributed version control system (mainly Mercurial)

Share commits$ hg push

LocalRemote

(or add destination)

Page 47: Introduction of Distributed version control system (mainly Mercurial)

Tagging$ hg tag [tag name]

Local

Page 48: Introduction of Distributed version control system (mainly Mercurial)

Thanks for listening