2. Starting points
• Distributed Version Control System
Local Repository Remote Repository
Push
1 2 4
1 2 4
Pull
3
3
hg init
hg commit -m “fixed that bug”
hg update
Commit Update hg add file1.h file2.m ...
hg remove file3.h
hg addremove
hg clone [server]
hg push [server]
hg pull [server]
hg fetch [server]
Work Area
hg summary
hg status
hg blame -lun file.m
3. 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)
4.
5.
6. Subrepo
• Version that depends on external libs
controlled dependencies
• An app
• Those libs are version controlled
• Keep dependency revision when committing
App A/
.hg
Sources/
file1.c
Deps/
Lib B/
.git
Lib C/
.svn
7. Compared to git
• Very similar, yet conceptual differences
• Mercurial
• Immutability of history • Arrived at about the same time
•
• As replacements to BitKeeper
Consistent & focused interface, extensible
• Mercurial projects
• Anonymous branches • Mozilla, OpenOffice,
NetBeans, Octave...
• git
• Content tracking
• Powerful interface, more complexity
• Named branches (namespace, light-weight...)
• Which one should I use? source /
•Xcode4 / cross platform / open
dependencies / users skills
• Try both!
8. Use Cases
• Creaceed data repositories
•Source &
• 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
• KadroidSVN
•Before:
• No network > one becomes the server (hg serve)
• Bitbucket