The document discusses distributed version control systems (DVCS) like Mercurial compared to centralized version control systems like Subversion. It covers basic DVCS concepts like repositories, changesets, branching and merging in Mercurial. It also provides examples of using Mercurial for separate feature development, collaborative feature development, and tagging revisions.
25. Mercurial!
"hg commit" adds a new node
"hg push" and "hg pull" transfer nodes in the
graph between two repositories
"hg merge" merge changes in a repository
37. Anonymous Branches!
• Fast "
• No name required"
• No closing required"
• No description"
• Changeset # required
(lookup with hg log)"
Disadvantages"Advantages"
42. The Basics!
hg init create a new repositoryhg commit save your
changes in the current repositoryhg log see all changes in
your repositoryhg pull pull all changes from another
repository into yourshg push push your changes into
another repositoryhg merge join different lines of history
hg update update the repository's working di
rectoryhg help <command>
44. Separate Features!
$ hg clone project feature$ cd feature$
(do some changes and commits)
Clone
45. Separate Features!
$ cd ../project$ hg incoming ../feature
Incoming
Use hg incoming --patch to view the diffs
46. Separate Features!
$ hg pull ../feature
Pull
The history of feature one is now in your project.
However, changes are not yet visible and only stored
in the .hg directory
50. Collaborative Feature Development!
$ hg branch feature(do some changes)$ hg
commit(write commit message)
Create a branch
$ hg update feature(do some changes)$ hg
commit(write commit message)
51. Collaborative Feature Development!
$ hg update default$ hg merge feature$
hg commit(write commit message)
Merge the named branch
Named branches stay in history as permanent records
after you finished your work.