Download presentation
Presentation is loading. Please wait.
Published byPhilip Gardner Modified over 9 years ago
1
Mercurial – Revision Control System
2
Overview of Revision Control Systems (IBM) Rational ClearQuest Perforce Centralized systems – CVS, Subversion/SVN Distributed systems – GIT, Mercurial (Also Microsoft systems – MS Visual Source Safe, Visual Studio Team System)
3
Centralized vs. Distributed
4
Mercurial (or Hg) Key features – distributed – computationally efficient – works over HTTP – open source – hosted also on code.google.com
5
Installing Mercurial WindowsXP – TortoiseHg Ubuntu/Debian – apt-get install mercurial Fedora/CentOS – yum install mercurial Eclipse plugins??
6
Some commands hg init (empty repository) hg clone http://hg.serpentine.com/tutorial/hello (similar to physical copy)http://hg.serpentine.com/tutorial/hello hg log (read commit history and comments by users) hg log -r 3 (What was done for revision number 3) hg status (which files are modified locally, merge conflicts, etc.) hg pull hg commit
7
Changesets
8
Implementation: File Logs
9
Implementation: Snapshots and Diffs
10
Revlog Hierarchy
11
Displaying Events $ hg log -v -r 3 changeset: 3:0272e0d5a517 user: Bryan O'Sullivan date: Sat Aug 16 22:08:02 2008 +0200 files: Makefile description: Get make to generate the final binary from a.o file. hg log -v -p -r 2 (-p is “patch option” that displays diff-files)
12
diff and patch $ echo 'this is my original thought' > oldfile $ echo 'i have changed my mind' > newfile $ diff -u oldfile newfile > tiny.patch $ cat tiny.patch --- oldfile 2009-05-05 06:44:39.554480179 +0000 +++ newfile 2009-05-05 06:44:39.554480179 +0000 @@ -1 +1 @@ -this is my original thought +i have changed my mind $ patch < tiny.patch patching file oldfile $ cat oldfile i have changed my mind
13
Collaboration Models Anarchy Single Central Repository Multiple Branches Feature Branches Release Train Linux Kernel – use case
14
Backouts hg backout -m 'back out second change' tip
15
Backouts – A Complex Scenario
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.