# HG changeset patch # User Brian Neal # Date 1321130949 21600 # Node ID c9a18db5197695afdb371a2e61f91587b376e5e1 # Parent 0130da731f8354650f8e81ef4f175310375ea7ad Basic presentation finished. diff -r 0130da731f83 -r c9a18db51976 images/repos.png Binary file images/repos.png has changed diff -r 0130da731f83 -r c9a18db51976 images/stop.jpg Binary file images/stop.jpg has changed diff -r 0130da731f83 -r c9a18db51976 images/workflow1.png Binary file images/workflow1.png has changed diff -r 0130da731f83 -r c9a18db51976 images/workflow2.png Binary file images/workflow2.png has changed diff -r 0130da731f83 -r c9a18db51976 images/workflow3.png Binary file images/workflow3.png has changed diff -r 0130da731f83 -r c9a18db51976 slides.rst --- a/slides.rst Thu Nov 10 22:04:38 2011 -0600 +++ b/slides.rst Sat Nov 12 14:49:09 2011 -0600 @@ -9,14 +9,10 @@ (Sublimal Message) ================== -(We should be using this at work... ) -------------------------------------- - -(Seriously... ) +.. image:: images/stop.jpg ---- - # whoami ======== @@ -286,9 +282,9 @@ - Repositories & working copies - Changesets -- Revisions, changesets, & heads +- Branches & Tags +- Example workflow - Command overview -- Example workflow ---- @@ -297,14 +293,14 @@ A repository consists of two things: -- Your working copy (a directory tree of files) +- Your working directory (similar to a working copy in SVN) - The repository itself (also known as "the store") - A .hg directory at the top of your working copy Example:: - brian@gremmie:~/Documents/Rockwell/brownbags/dvcs/dvcs$ la + $ ls -A .hg .hgignore images/ slides.cfg slides.css slides.html slides.rst ---- @@ -316,10 +312,70 @@ .. image:: images/repos.png -- Each changeset can have 0, 1, or 2 parents +- Each changeset can have 0, 1, or 2 parents (and infinite children) - A changeset with 0 parents is the root - A changeset with 2 parents is the result of a merge -- The newest changeset is called the *tip* +- The newest changeset is called the *tip*, a special tag name + +---- + +What's a Changeset? +=================== + +A changeset is an atomic collection of changes and some meta information. +The meta information includes: + +- Who made the changes +- When the changes were made +- Why - the commit message +- The name of the branch the changes were made on ("default" is the default) +- A local revision number +- A changeset ID; a 40 digit hex number (SHA-1 hash of the changeset & parents) + +A changeset can be named by: + +- Revision number (within a repository) +- Changeset ID (globally) +- Tag name + +---- + +Branches & Tags +=============== + +- In the simple case, each changeset appear in a line +- When a changeset develops 2 or more children, a branch occurs + + - The latest revision of a branch is called a *head* + - A *merge* is when two branches join back together + - Branches can be given names; the default branch name is *"default"* + +- Changesets can be given human readable names, or *tags* + + - *Local tags* are only visible within a repository + - *Regular tags* are revision controlled and propagate to other repos + - The newest head in a repository is a tag called *tip* + +---- + +Example Workflow +================ + +.. image:: images/workflow1.png + +---- + +Example Workflow (cont.) +======================== + +.. image:: images/workflow2.png + +---- + +Example Workflow (cont.) +======================== + +.. image:: images/workflow3.png ---- @@ -331,20 +387,20 @@ - add, remove, copy, move, mkdir - checkout, commit, update, revert - merge, resolved, diff -- status +- status, log - lock, unlock ---- -Mercurial Commands -================== +Basic Mercurial Commands +======================== Mercurial (hg) vs SVN commands: - add, remove, copy, move, :strike:`mkdir` - :strike:`checkout`, commit, update, revert -- merge, resolve, diff -- status +- merge, resolve, diff, **heads** +- status, log - :strike:`lock, unlock` Additional "distributed commands": @@ -353,3 +409,21 @@ - incoming, outgoing - serve +**Not a whole lot to learn above SVN** + +---- + +References +========== + +- Mercurial http://mercurial.selenic.com/ +- Mercurial Wiki http://mercurial.selenic.com/wiki/ +- Mercurial Book (free!) http://hgbook.red-bean.com/ +- Hg Init: A Mercurial Tutorial http://hginit.com +- Version Control By Example (free!) http://www.ericsink.com/vcbe/ + +---- + +Questions? +========== +