bgneal@1: .. role:: strike bgneal@1: :class: strike bgneal@1: bgneal@0: Introduction to Distributed Version Control with Mercurial bgneal@0: ========================================================== bgneal@0: bgneal@0: ---- bgneal@0: bgneal@1: (Sublimal Message) bgneal@1: ================== bgneal@1: bgneal@1: (We should be using this at work... ) bgneal@1: ------------------------------------- bgneal@1: bgneal@1: (Seriously... ) bgneal@1: bgneal@1: ---- bgneal@1: bgneal@1: bgneal@0: # whoami bgneal@0: ======== bgneal@0: bgneal@0: Brian Neal bgneal@0: bgneal@0: Started at Rockwell Collins in July 1999 bgneal@0: bgneal@1: Perhaps you've recognized me from the following programs: bgneal@0: bgneal@0: - UMS (July 1999 - Spring 2000) bgneal@0: - Surgical Strike - (Spring - Fall 2000) bgneal@0: - JTRS 2B - (Fall 2000 - Summer 2001) bgneal@0: - SCAMP SEP - (Summer 2001 - October 2004) bgneal@0: - TTNT (January 2005 - Present) bgneal@0: bgneal@0: ---- bgneal@0: bgneal@0: Brief History of Version Control Tools bgneal@0: ====================================== bgneal@0: bgneal@0: First Generation bgneal@0: ---------------- bgneal@0: bgneal@1: - No networking! bgneal@1: - Concurrency method: locks bgneal@0: - Examples: bgneal@0: bgneal@0: - SCCS - 1972 bgneal@0: - RCS - 1982 bgneal@0: bgneal@0: ---- bgneal@0: bgneal@0: Brief History of Version Control Tools bgneal@0: ====================================== bgneal@0: bgneal@0: Second Generation bgneal@0: ----------------- bgneal@0: bgneal@0: - Client/Server networking; CVCS (Centralized Version Control) bgneal@1: - Concurrency method: merge before commit bgneal@0: - Examples: bgneal@0: bgneal@0: - CVS - 1990 bgneal@0: - IBM Rational ClearCase - 1992 bgneal@0: - Visual SourceSafe - 1994 bgneal@0: - Perforce - 1995 bgneal@0: - SVN - 2000 bgneal@0: bgneal@0: ---- bgneal@0: bgneal@0: Brief History of Version Control Tools bgneal@0: ====================================== bgneal@0: bgneal@0: Third Generation bgneal@0: ---------------- bgneal@0: bgneal@0: - Distributed networking; DVCS (Distributed Version Control) bgneal@1: - Concurrency method: commit then merge bgneal@1: - Examples: bgneal@0: bgneal@0: - Bitkeeper - 2000 bgneal@0: - Darcs - 2003 bgneal@0: - Monotone - 2003 bgneal@0: - Git - 2005 bgneal@0: - **Mercurial** - 2005 bgneal@0: - Fossil - 2006 bgneal@0: - Bazaar - 2007 bgneal@1: - Veracity - 2011 bgneal@1: bgneal@1: ---- bgneal@1: bgneal@1: What is a CVCS Again? bgneal@1: ===================== bgneal@1: bgneal@1: .. image:: images/cvcs.png bgneal@1: bgneal@1: ---- bgneal@1: bgneal@1: What is a CVCS Again? bgneal@1: ===================== bgneal@1: bgneal@1: Basic SVN commands: bgneal@1: bgneal@1: - add, remove, copy, move, mkdir bgneal@1: - checkout, commit, update, revert bgneal@1: - merge, resolved, diff bgneal@1: - status bgneal@1: - lock, unlock bgneal@1: bgneal@1: ---- bgneal@1: bgneal@1: So what's a DVCS look like? bgneal@1: =========================== bgneal@1: bgneal@1: .. image:: images/dvcs.png bgneal@1: bgneal@1: All repositories are peers. By convention only, one repository is designated the master. bgneal@1: It is possible for all peers to exchange changes. bgneal@1: bgneal@1: ---- bgneal@1: bgneal@1: So what's a DVCS look like? bgneal@1: =========================== bgneal@1: bgneal@1: Mercurial (hg) vs SVN commands: bgneal@1: bgneal@1: - add, remove, copy, move, :strike:`mkdir` bgneal@1: - :strike:`checkout`, commit, update, revert bgneal@1: - merge, resolve, diff bgneal@1: - status bgneal@1: - :strike:`lock, unlock` bgneal@1: bgneal@1: Additional "distributed commands": bgneal@1: bgneal@1: - clone, push, pull bgneal@1: - incoming, outgoing bgneal@1: - serve bgneal@1: