changeset 207:15da3ea8fc43

Partial transplant from 7f2f119a584c.
author Martin Geisler <mg@lazybytes.net>
date Thu, 16 Sep 2010 01:11:30 +0200
parents 9784b6a58d08
children 3d3da1e8a024
files centralized.tex distributed.tex key-commands.tex links.tex
diffstat 4 files changed, 91 insertions(+), 43 deletions(-) [+]
line wrap: on
line diff
--- a/centralized.tex
+++ b/centralized.tex
@@ -1,8 +1,8 @@
 \begin{frame}{Centralized Revision Control}
-  Subversion uses a single server:
+  Single repository, multiple working copies:
   \begin{center}
-    \begin{tikzpicture}
-      \tikzstyle{working copy}+=[below, text width=25mm]
+    \begin{tikzpicture}[remember picture]
+      \tikzstyle{working copy}+=[below]
 
       \node[repository, label=above:Repository] (repository) {};
       \node[rev] (r1) at (-7mm, 0) {};
@@ -11,26 +11,28 @@
       \draw[->] (r1) -- (r2);
       \draw[->] (r2) -- (r3);
 
-      \node[working copy, label=below:Alice] (a) at (-3.5, -2.5) {
-        trunk/\\
-        \quad hello.c\\
-        \quad Makefile
+
+      \node[working copy, label=below:Alice] (wa) at (-2, -2) {
+        hello.c\\
+        Makefile
       };
-      \node[working copy, label=below:Bob] (b) at (0, -2.5) {
-        branches/\\
-        \quad bob/\\
-        \qquad hello.c\\
-        \qquad Makefile
-      };
-      \node[working copy, label=below:Carla] (c) at (3.5, -2.5) {
-        trunk/\\
-        \quad hello.c\\
-        \quad Makefile
+
+      \node[working copy, label=below:Bob, text width=18mm] (wb) at (2, -2) {
+        goodbye.c\\
+        Makefile
       };
 
-      \draw[<->, short] (a) -- (repository);
-      \draw[<->, short] (b) -- (repository);
-      \draw[<->, short] (c) -- (repository);
+      \draw[<->, short] (wa) -- (repository);
+      \draw[<->, short] (wb) -- (repository);
+
+      \node<2>[box, text width=5cm]  at (current page.center) {
+        Drawbacks:
+        \begin{itemize}
+        \item network latency
+        \item single point of failure
+        \item contrained workflow
+        \end{itemize}
+      };
     \end{tikzpicture}
   \end{center}
 \end{frame}
--- a/distributed.tex
+++ b/distributed.tex
@@ -1,26 +1,53 @@
 \begin{frame}{Distributed Revision Control}
   Mercurial duplicates the history on many servers:
   \begin{center}
-    \begin{tikzpicture}[start chain, bend angle=10]
-      \tikzstyle{every node}=[repository, minimum height=18mm, text width=15mm,]
-      \tikzstyle{every path}=[<->, short]
+    \begin{tikzpicture}[remember picture]
+      \tikzstyle{working copy}+=[below=3pt]
+
+      \begin{scope}[xshift=-3cm]
+        \node[repository] (a) {};
+        \node[rev] (ar1) at (-7mm, 0) {};
+        \node[rev] (ar2) at (0, 0) {};
+        \draw[->] (ar1) -- (ar2);
+      \end{scope}
+
+      \begin{scope}[xshift=3cm]
+        \node[repository] (b) {};
+        \node[rev] (br1) at (-7mm, 0) {};
+        \node[rev] (br2) at (0, 0) {};
+        \node[rev] (br3) at (7mm, 0) {};
+        \draw[->] (br1) -- (br2);
+        \draw[->] (br2) -- (br3);
+      \end{scope}
+
+      \node[working copy] (wa) at (a.south) {
+        hello.c\\
+        Makefile
+      };
 
-      \node (a) at ( 90:3) {Alice};
-      \node (b) at (210:3) {Bob};
-      \node (c) at (-30:3) {Carla};
-      \draw<1-2> (a) -- (b);
-      \draw<1-2> (b) -- (c);
-      \draw<1-2> (c) -- (a);
+      \node[working copy, text width=18mm] (wb) at (b.south) {
+        goodbye.c\\
+        Makefile
+      };
+
+      \begin{pgfonlayer}{background}
+        \node[label=below:Alice, highlight, fit=(a) (wa)] {};
+        \node[label=below:Bob, highlight, fit=(b) (wb)] {};
+      \end{pgfonlayer}
 
-      \node<2->[overlay] (l) at ([xshift=3cm] a) {Alice's Laptop};
-      \draw<2-> (a) -- (l);
+      \node<2->[box, text width=6cm] at (current page.center) {
+        Advantages:
+        \begin{itemize}
+        \item no network latency
+        \item distributed, off-line operations
+        \item no imposed workflow
+        \end{itemize}
 
-      \node<3-> (r) at (0, 0) {Server};
-      \draw<3-> (a) -- (r);
-      \draw<3-> (b) to[bend left] (r);
-      \draw<3-> (c) to[bend right] (r);
-
-      \draw<4-> (a) to[bend right] (b);
+        Drawback(?):
+        \begin{itemize}
+        \item must synchronize repositories
+        \end{itemize}
+      };
     \end{tikzpicture}
   \end{center}
 \end{frame}
--- a/key-commands.tex
+++ b/key-commands.tex
@@ -1,14 +1,33 @@
 \begin{frame}{Key Mercurial Commands}
+  \begin{tikzpicture}
+    \tikzstyle{repository}+=[minimum height=18mm, text width=15mm]
+
+    \node[repository] (a) {};
+    \node[working copy, left=2cm of a] (working copy) {hello.c\\Makefile};
+    \draw[short, ->] (working copy) to[bend left=10] node[above] {commit} (a);
+    \draw[short, ->] (a) to[bend left=10] node[below] {update} (working copy);
+
+    \begin{pgfonlayer}{background}
+      \node[label=below:Alice, highlight, fit=(a) (working copy)] {};
+    \end{pgfonlayer}
+
+    \node<2>[repository, right=2cm of a] (repository) {};
+    \draw<2>[short, ->] (a) to[bend left=10] node[above] {push} (repository);
+    \draw<2>[short, ->] (repository) to[bend left=10] node[below] {pull} (a);
+  \end{tikzpicture}
+
   Local commands:
   \begin{itemize}
-  \item \cmd{hg commit}: save a snapshot into the current repository.
-  \item \cmd{hg update}: checkout revision into working directory.
-  \item \cmd{hg merge}: join different lines of history.
+  \item \cmd{hg commit}: save a snapshot into the current repository
+  \item \cmd{hg update}: checkout revision into working directory
+  \item \cmd{hg merge}: join different lines of history
   \end{itemize}
 
+  \pause
+
   Network commands:
   \begin{itemize}
-  \item \cmd{hg pull}: retrieve changesets from another repository.
-  \item \cmd{hg push}: send your changesets to another repository.
+  \item \cmd{hg pull}: retrieve changesets from another repository
+  \item \cmd{hg push}: send your changesets to another repository
   \end{itemize}
 \end{frame}
--- a/links.tex
+++ b/links.tex
@@ -12,6 +12,6 @@
     \curl{http://bitbucket.org/}\\
     \curl{http://code.google.com/} \\
     \curl{http://sourceforge.net/}\\
-    \curl{http://www.codeplex.com/} (Microsoft)
+    \curl{http://www.codeplex.com/}
   \end{itemize}
 \end{frame}