Mercurial Intro
-
Upload
rsebbe -
Category
Technology
-
view
970 -
download
0
description
Transcript of Mercurial Intro
Starting points• Distributed Version Control System
1 2
3
4
Work Area
Commit Update
1 2
3
4
Local Repository Remote Repository
Push
Pull
hg inithg commit -m “fixed that bug”hg updatehg add file1.h file2.m ... hg remove file3.hhg addremove
hg clone [server]hg push [server]hg pull [server]hg fetch [server]
hg summaryhg statushg blame -lun file.m
Specificities• Written in Python• Cross Platform (Windows, etc.)
• Extensions
• Easy commands, clean and specific
• Local changeset numbering
• Fast and efficient
• hg serve
• subrepo
• Bitbucket • One free private repository
• Murky.app (GUI)
Subrepo
• Version controlled dependencies• An app that depends on external libs
• Those libs are version controlled
• Keep dependency revision when committing
App A/.hgSources/
file1.cDeps/
Lib B/.git
Lib C/.svn
Compared to git• Very similar, yet conceptual differences• Mercurial• Immutability of history
• Consistent & focused interface, extensible
• Anonymous branches
• git
• Content tracking
• Powerful interface, more complexity
• Named branches (namespace, light-weight...)
• Which one should I use?• Xcode4 / cross platform / open source /
dependencies / users skills
• Try both!
• Arrived at about the same time
• As replacements to BitKeeper
• Mercurial projects• Mozilla, OpenOffice, NetBeans, Octave...
Use Cases• Creaceed• Source & data repositories• Warning: data repositories can quickly become huge...
• Use something else for data
• Multi-people (2-3) configuration• Specific rights to access certain repositories
• Single ssh account on server, different access rights (per repo)
• Bitbucket
• Kadroid• Before: SVN
• No network > one becomes the server (hg serve)
• Bitbucket
Links
• http://mercurial.selenic.com
• http://hgbook.red-bean.com
• http://mercurial.selenic.com/wiki/UsingExtensions
• http://mercurial.selenic.com/wiki/SharedSSH
Thanks
web: www.creaceed.comemail: [email protected]: @rsebbe cocoaheads.be