2. Who am I?
Ivan Ostafiychuk <iostaf@gmail.com>,
Software Engeener
Working at SoftServe Inc.
3. What is a Mercurial?
● Distributed Version Control System like Git,
Bazaar and others
● Mercurial was created by Matt Mackall in
April 19, 2005
● The latest stable 2.1 is released February 1,
2012 (3 days ago)
4. Getting Started
How can you get it?
● Windows
Get it from http://tortoisehg.bitbucket.org/
● Linux
Ubuntu: $ apt-get install mercurial
Fedora: $ yum install mercurial
Gentoo: $ emerge mercurial
Mac OS X
http://mercurial.berkwood.com/
6. Start Tour: Daily commands
Command Description
help <cmd> Built-in help system
init Create empty repository
add Mark files to be added to repository
Mark files to be removed from
remove (rm)
repository
commit (ci) Commit your changes to repository
status (st) Show your changes
history (log) Show your changes
7. Start Tour: Example
$ cd ~
$ mkdir my-cool-project
$ cd my-cool-project
$ vi main.c
$ hg add main.c
$ hg ci -m "Initial commit."
$ vi main.c
$ hg ci -m "Refactored a bit"
8. TeamWork: commands
Command Description
clone Make a copy of your repository
pull Pull changes from another repository into
yours
pull -u Performs the same as pull but also updates
working directory
push Push your changes into another repository
merge Merge working directory with another
revision
9. TeamWork: Example
$ mv my-cool-project john@my-cool-project
$ hg clone john@my-cool-project
bob@my-cool-project
$ cd bob@my-cool-project
$ # doing our stuf here (e.g. changes, commits)
$ # BUT john also developed some awesome
feature and we want it NOW
$ hg pull -u ../john@my-cool-project
$ hg merge && hg ci -m"Synced with John."
14. BitBucket.org
● Free hosting for Mercurial and Git
● Unlimited repositories in terms of size and
count
● Wiki & Issue Tracker
● Support for fork and pull model