Mercurial > public > dvcs_intro_brownbag
changeset 4:c9a18db51976
Basic presentation finished.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 12 Nov 2011 14:49:09 -0600 |
parents | 0130da731f83 |
children | b9801a668bff |
files | images/repos.png images/stop.jpg images/workflow1.png images/workflow2.png images/workflow3.png slides.rst |
diffstat | 6 files changed, 90 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- 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? +========== +