mercurial intro
DESCRIPTION
Short introduction of Mercurial versioning system made at Cocoaheads Belgium, August 2010TRANSCRIPT
![Page 2: Mercurial Intro](https://reader034.vdocuments.pub/reader034/viewer/2022051612/54c208b44a7959e6068b4607/html5/thumbnails/2.jpg)
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
![Page 3: Mercurial Intro](https://reader034.vdocuments.pub/reader034/viewer/2022051612/54c208b44a7959e6068b4607/html5/thumbnails/3.jpg)
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)
![Page 4: Mercurial Intro](https://reader034.vdocuments.pub/reader034/viewer/2022051612/54c208b44a7959e6068b4607/html5/thumbnails/4.jpg)
![Page 5: Mercurial Intro](https://reader034.vdocuments.pub/reader034/viewer/2022051612/54c208b44a7959e6068b4607/html5/thumbnails/5.jpg)
![Page 6: Mercurial Intro](https://reader034.vdocuments.pub/reader034/viewer/2022051612/54c208b44a7959e6068b4607/html5/thumbnails/6.jpg)
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
![Page 7: Mercurial Intro](https://reader034.vdocuments.pub/reader034/viewer/2022051612/54c208b44a7959e6068b4607/html5/thumbnails/7.jpg)
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...
![Page 8: Mercurial Intro](https://reader034.vdocuments.pub/reader034/viewer/2022051612/54c208b44a7959e6068b4607/html5/thumbnails/8.jpg)
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
![Page 9: Mercurial Intro](https://reader034.vdocuments.pub/reader034/viewer/2022051612/54c208b44a7959e6068b4607/html5/thumbnails/9.jpg)
Links
• http://mercurial.selenic.com
• http://hgbook.red-bean.com
• http://mercurial.selenic.com/wiki/UsingExtensions
• http://mercurial.selenic.com/wiki/SharedSSH