annotate ja/intro.tex @ 386:63060ad65ab8

started intro.tex
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Sat, 21 Feb 2009 23:56:55 +0900
parents 3b1291f24c0d
children 1604f2b2054b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
386
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
1 %\chapter{Introduction}
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
2 \chapter{$BF3F~(B}
16
81454425eee9 Progress on a few fronts, mainly indexing and MQ chapter content
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
3 \label{chap:intro}
81454425eee9 Progress on a few fronts, mainly indexing and MQ chapter content
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
4
386
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
5 %\section{About revision control}
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
6 \section{$B%j%S%8%g%s%3%s%H%m!<%k(B}
217
369858a4d63c Start to flesh out chapter 1.
Bryan O'Sullivan <bos@serpentine.com>
parents: 155
diff changeset
7
386
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
8 %Revision control is the process of managing multiple versions of a
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
9 %piece of information. In its simplest form, this is something that
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
10 %many people do by hand: every time you modify a file, save it under a
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
11 %new name that contains a number, each one higher than the number of
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
12 %the preceding version.
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
13
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
14 $B%j%S%8%g%s%3%s%H%m!<%k$H$O!$J#?t$N%P!<%8%g%s$N>pJs$r$r4IM}$9$k%W%m%;%9$G(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
15 $B$"$k!%:G$bC1=c$JJ}K!$O!$%U%!%$%k$rJQ99$7$?$i!$$=$l$^$G$N%P!<%8%g%s$h$j$b(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
16 $BBg$-$J?t;z$r4^$`?7$?$JL>A0$G%;!<%V$r9T$&$J$I$NJ}K!$GA4$F<j$G9T$&$3$H$G$"(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
17 $B$k!%(B
217
369858a4d63c Start to flesh out chapter 1.
Bryan O'Sullivan <bos@serpentine.com>
parents: 155
diff changeset
18
386
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
19 %Manually managing multiple versions of even a single file is an
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
20 %error-prone task, though, so software tools to help automate this
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
21 %process have long been available. The earliest automated revision
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
22 %control tools were intended to help a single user to manage revisions
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
23 %of a single file. Over the past few decades, the scope of revision
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
24 %control tools has expanded greatly; they now manage multiple files,
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
25 %and help multiple people to work together. The best modern revision
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
26 %control tools have no problem coping with thousands of people working
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
27 %together on projects that consist of hundreds of thousands of files.
217
369858a4d63c Start to flesh out chapter 1.
Bryan O'Sullivan <bos@serpentine.com>
parents: 155
diff changeset
28
386
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
29 $B$?$C$?0l$D$N%U%!%$%k$KBP$7$F$b!$J#?t$N%P!<%8%g%s$r<j$G4IM}$9$k$3$H$O4V0c(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
30 $B$$$r5/$3$70W$$:n6H$G!$$3$N%W%m%;%9$r<+F02=$9$k%=%U%H%&%'%"%D!<%k$,$+$J$j(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
31 $B$N@N$+$iDs6!$5$l$F$-$?!%:G=i$N<+F02=$5$l$?%j%S%8%g%s%3%s%H%m!<%k%D!<%k(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
32 $B$O!$0l?M$N%f!<%6$rBP>]$H$7$F!$(B1$B$D$N%U%!%$%k$N%j%S%8%g%s$r4IM}$9$k$?$a$K:n(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
33 $B$i$l$?!%?t==G/$,7P$A!$%j%S%8%g%s%3%s%H%m!<%k$N<h$j07$&%9%3!<%W$OBg$$$K3H(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
34 $BBg$7$?!%:#$G$OJ#?t?M$K$h$kJ#?t%U%!%$%k$NJT=8$r$b4IM}$9$k$3$H$,$G$-$k!%8=(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
35 $BBe$N:G9b$N%j%S%8%g%s4IM}%D!<%k$O?t@i?M$K$h$k!$?t==K|8D$N%U%!%$%k$rMJ$9$k(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
36 $B%W%m%8%'%/%H$K$bBP1~$9$k!%(B
155
914babdc99c8 run-example: better error if bogus section name found.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
37
386
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
38 %\subsection{Why use revision control?}
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
39 \subsection{$B$J$<%j%S%8%g%s%3%s%H%m!<%k$r;H$&$N$+(B?}
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
40
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
41 %There are a number of reasons why you or your team might want to use
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
42 %an automated revision control tool for a project.
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
43 $B%W%m%8%'%/%H$N$?$a$K<+F02=$5$l$?%j%S%8%g%s%3%s%H%m!<%k%D!<%k$r;H$*$&$H9M(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
44 $B$($kM}M3$O?tB?$/$"$k!%(B
217
369858a4d63c Start to flesh out chapter 1.
Bryan O'Sullivan <bos@serpentine.com>
parents: 155
diff changeset
45 \begin{itemize}
386
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
46 %\item It will track the history and evolution of your project, so you
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
47 % don't have to. For every change, you'll have a log of \emph{who}
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
48 % made it; \emph{why} they made it; \emph{when} they made it; and
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
49 % \emph{what} the change was.
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
50 \item $B%j%S%8%g%s4IM}%D!<%k$O!$%W%m%8%'%/%H$NMzNr$H?J2=$r5-O?$9$k$?$a!$<+(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
51 $BJ,<+?H$G5-O?$9$kI,MW$,$J$$!%A4$F$NJQ99$KBP$7$F(B\emph{$BC/$,(B}\emph{$B2?(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
52 $B$N$?$a$K(B}\emph{$B$$$D(B}\emph{$B2?$r(B}$BJQ99$7$?$N$+$,5-O?$5$l$k!%(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
53 %\item When you're working with other people, revision control software
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
54 % makes it easier for you to collaborate. For example, when people
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
55 % more or less simultaneously make potentially incompatible changes,
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
56 % the software will help you to identify and resolve those conflicts.
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
57 \item $BB>$N?M$H:n6H$7$F$$$k;~!$%j%S%8%g%s%3%s%H%m!<%k%=%U%H%&%'%"$O6&F1(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
58 $B:n6H$r=u$1$k!%Nc$($P!$?M!9$,F1;~$K8_49@-$N$J$$JQ99$r9T$C$?>l9g!$(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
59 $B%=%U%H%&%'%"$O%3%s%U%j%/%H$rFCDj$7!$2D7h$9$k$3$H$r=u$1$k!%(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
60 %\item It can help you to recover from mistakes. If you make a change
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
61 % that later turns out to be in error, you can revert to an earlier
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
62 % version of one or more files. In fact, a \emph{really} good
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
63 % revision control tool will even help you to efficiently figure out
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
64 % exactly when a problem was introduced (see
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
65 % section~\ref{sec:undo:bisect} for details).
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
66 \item $B%j%S%8%g%s4IM}%D!<%k$OHH$7$?%_%9$+$i$N2sI|$r=u$1$k!%2C$($?JQ99$,8e(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
67 $B$G4V0c$$$G$"$C$?$HJ,$+$C$?;~!$(B1$B$D$^$?$OJ#?t$N%U%!%$%k$X$NJQ99$rGK4~$9$k$3(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
68 $B$H$,$G$-$k!%<B:]$N$H$3$m!$(B\emph{$B??$K(B}$BM%$l$?%j%S%8%g%s%3%s%H%m!<%k%D!<%k$O(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
69 $BJ6$l9~$s$@LdBj$rFCDj$9$k$N$r;Y1g$9$k5!G=$r;}$D!%!J>\:Y$K$D$$$F(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
70 $B$O(B~\ref{sec:undo:bisect}$B@a$r;2>H!%!K(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
71 %\item It will help you to work simultaneously on, and manage the drift
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
72 % between, multiple versions of your project.
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
73 \item $B%j%S%8%g%s4IM}%D!<%k$O!$%W%m%8%'%/%H$NJ#?t$N%P!<%8%g%s$G$NF1;~:n(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
74 $B6H$d!$%j%S%8%g%s4V$N0\9T$r;Y1g$9$k!%(B
217
369858a4d63c Start to flesh out chapter 1.
Bryan O'Sullivan <bos@serpentine.com>
parents: 155
diff changeset
75 \end{itemize}
386
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
76 %Most of these reasons are equally valid---at least in theory---whether
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
77 %you're working on a project by yourself, or with a hundred other
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
78 %people.
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
79 $B$3$l$i$NM}M3$NB?$/$O<+J,<+?H$N%W%m%8%'%/%H$G:n6H$7$F$$$F$b!$(B100$B?M$N6&F1:n(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
80 $B6H<T$H:n6H$7$F$$$F$b>/$J$/$H$bM}O@E*$K$OEy$7$/M-0U$G$"$k!%(B
218
75fd236d736b History of SCM tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 217
diff changeset
81
386
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
82 %A key question about the practicality of revision control at these two
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
83 %different scales (``lone hacker'' and ``huge team'') is how its
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
84 %\emph{benefits} compare to its \emph{costs}. A revision control tool
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
85 %that's difficult to understand or use is going to impose a high cost.
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
86
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
87 $B%j%S%8%g%s%3%s%H%m!<%k$N<BMQ@-$K4X$9$k80$K$J$k<ALd$O!$$3$l$i$N(B2$B$D$N0[$J$C(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
88 $B$?%9%1!<%k!J(B``$B0l?M$N%O%C%+!<(B''$B%l%Y%k$+$i(B``$BBg5,LO%A!<%`(B''$B%l%Y%k$^$G!K$K$*(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
89 $B$$$F!$%3%9%H$KBP$7$F$I$l$@$1Mx1W$,$"$k$N$+$H$$$&$3$H$G$"$k!%M}2r$d;HMQ$,(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
90 $B:$Fq$J%j%S%8%g%s%3%s%H%m!<%k%D!<%k$O9b$$%3%9%H$r2!$7$D$1$k!%(B
218
75fd236d736b History of SCM tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 217
diff changeset
91
386
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
92 %A five-hundred-person project is likely to collapse under its own
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
93 %weight almost immediately without a revision control tool and process.
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
94 %In this case, the cost of using revision control might hardly seem
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
95 %worth considering, since \emph{without} it, failure is almost
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
96 %guaranteed.
218
75fd236d736b History of SCM tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 217
diff changeset
97
386
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
98 500$B?M$+$i$J$k%W%m%8%'%/%H$G$O!$%j%S%8%g%s%3%s%H%m!<%k%D!<%k$J$7$G$OKX$s$I(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
99 $BN)$A9T$+$J$$!%$3$N>l9g!$%j%S%8%g%s%3%s%H%m!<%k$J$7$G$O<:GT$9$k$3$H$,KX$s(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
100 $B$IL@Gr$J$?$a!$%j%S%8%g%s%3%s%H%m!<%k$r9T$&%3%9%H$rJ'$&$3$H$OFC$KLdBj$H$O(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
101 $B$J$i$J$$!%(Bxxx
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
102
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
103 %On the other hand, a one-person ``quick hack'' might seem like a poor
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
104 %place to use a revision control tool, because surely the cost of using
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
105 %one must be close to the overall cost of the project. Right?
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
106
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
107 $B0lJ}!$(B1$B?M$N3+H/<T$K$h$k(B``$B%/%$%C%/%O%C%/(B''$B$O%j%S%8%g%s%3%s%H%m!<%k%D!<%k(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
108 $B$r;H$&$K$O$"$^$j$U$5$o$7$/$J$$!%$J$<$J$i!$%D!<%k$r;H$&%3%9%H$,$[$\%W%m%8%'(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
109 $B%/%H$N%3%9%H$=$N$b$N$G$"$k$+$i$@!%$3$l$O@5$7$$$@$m$&$+!)(B
218
75fd236d736b History of SCM tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 217
diff changeset
110
386
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
111 %Mercurial uniquely supports \emph{both} of these scales of
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
112 %development. You can learn the basics in just a few minutes, and due
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
113 %to its low overhead, you can apply revision control to the smallest of
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
114 %projects with ease. Its simplicity means you won't have a lot of
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
115 %abstruse concepts or command sequences competing for mental space with
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
116 %whatever you're \emph{really} trying to do. At the same time,
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
117 %Mercurial's high performance and peer-to-peer nature let you scale
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
118 %painlessly to handle large projects.
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
119
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
120 Mercurial$B$O$3$l$i$N3+H/%9%1!<%k$NN>J}$r%5%]!<%H$7$F$$$k!%4pACE*$J;HMQK!$O(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
121 $B?tJ,$G3X$V$3$H$,$G$-!$%j%S%8%g%s%3%s%H%m!<%k$r:G>.5,LO$N%W%m%8%'%/%H$K4J(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
122 $BC1$K<h$jF~$l$k$3$H$,$G$-$k!%C1=c$G$"$k$?$a!$Fq2r$J%3%s%;%W%H$d%3%^%s%I%7!<(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
123 $B%1%s%9$K0U<1$NB?$/$r@j$a$i$l!$K\Ev$K$d$j$?$$$3$H$,AB$+$K$J$k$3$H$b$J$$!%(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
124 $B$^$?F1;~$K(BMercurial$B$N@-G=$N9b$5$d!$%T%"%D!<%T%"$N@-<A$N$?$a$K!$Bg5,LO%W%m(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
125 $B%8%'%/%H$K$b6lO+$9$k;v$J$/%9%1!<%k$9$k$3$H$,$G$-$k!%(B
217
369858a4d63c Start to flesh out chapter 1.
Bryan O'Sullivan <bos@serpentine.com>
parents: 155
diff changeset
126
386
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
127 %No revision control tool can rescue a poorly run project, but a good
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
128 %choice of tools can make a huge difference to the fluidity with which
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
129 %you can work on a project.
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
130
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
131 $B$*AFKv$J%W%m%8%'%/%H$r5_:Q$9$k$h$&$J%j%S%8%g%s%3%s%H%m!<%k$OB8:_$7$J$$(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
132 $B$,!$NI$$%D!<%k$NA*Br$O!$:n6H$9$k%W%m%8%'%/%H$N7x<B$5$KBg$-$J:9$r$b$?$i$9!%(B
219
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
133
386
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
134 %\subsection{The many names of revision control}
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
135 \subsection{$BMM!9$J%j%S%8%g%s%3%s%H%m!<%k(B}
217
369858a4d63c Start to flesh out chapter 1.
Bryan O'Sullivan <bos@serpentine.com>
parents: 155
diff changeset
136
386
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
137 %Revision control is a diverse field, so much so that it doesn't
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
138 %actually have a single name or acronym. Here are a few of the more
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
139 %common names and acronyms you'll encounter:
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
140 $B%j%S%8%g%s%3%s%H%m!<%k$OBg$-$JI}$r$b$DJ,Ln$G$"$j!$$=$N$?$aB?$/$N8F$SL>$H(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
141 $B$=$NC;=L7A$,CN$i$l$F$$$k!'(B
217
369858a4d63c Start to flesh out chapter 1.
Bryan O'Sullivan <bos@serpentine.com>
parents: 155
diff changeset
142 \begin{itemize}
386
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
143 \item $B%j%S%8%g%s%3%s%H%m!<%k(B (Revision control (RCS))
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
144 \item $B%=%U%H%&%'%"@_Dj%^%M%8%a%s%H$^$?$O@_Dj%^%M%8%a%s%H(B (Software configuration management (SCM), or configuration management)
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
145 \item $B%=!<%9%3!<%I%^%M%8%a%s%H(B (Source code management)
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
146 \item $B%=!<%9%3!<%I%3%s%H%m!<%k$^$?$O%=!<%9%3%s%H%m!<%k(B (Source code control, or source control)
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
147 \item $B%P!<%8%g%s%3%s%H%m!<%k(B (Version control (VCS))
217
369858a4d63c Start to flesh out chapter 1.
Bryan O'Sullivan <bos@serpentine.com>
parents: 155
diff changeset
148 \end{itemize}
386
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
149 %Some people claim that these terms actually have different meanings,
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
150 %but in practice they overlap so much that there's no agreed or even
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
151 %useful way to tease them apart.
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
152 $B$3$l$i$NMQ8l$O3F!90c$&0UL#$r;}$D$N$@$H<gD%$9$k?M!9$b$$$k!%$7$+$7<B<AE*$K(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
153 $B$O$3$l$i$O8_$$$KBg$-$/=E$J$C$F$*$j!$$o$6$o$66hJL$9$k$3$H$O0lHLE*$G$J$/!$(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
154 $B$^$?M-MQ$G$b$J$$!%(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
155
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
156 %\section{A short history of revision control}
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
157 \section{$B%j%S%8%g%s%3%s%H%m!<%k$NNr;K(B}
155
914babdc99c8 run-example: better error if bogus section name found.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
158
386
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
159 %The best known of the old-time revision control tools is SCCS (Source
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
160 %Code Control System), which Marc Rochkind wrote at Bell Labs, in the
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
161 %early 1970s. SCCS operated on individual files, and required every
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
162 %person working on a project to have access to a shared workspace on a
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
163 %single system. Only one person could modify a file at any time;
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
164 %arbitration for access to files was via locks. It was common for
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
165 %people to lock files, and later forget to unlock them, preventing
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
166 %anyone else from modifying those files without the help of an
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
167 %administrator.
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
168
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
169 $B:G$bCN$i$l$F$$$k8E$$%j%S%8%g%s%3%s%H%m!<%k%D!<%k$O!$(BMarc Rochkind$B$,(B1970$BG/(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
170 $BBe=iF,$K(BBell$B8&5f=j$G=q$$$?(BSCCS (Source Code Control System)$B$G$"$k!%(B SCCS
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
171 $B$O8D!9$N%U%!%$%k$KBP$7$FF0:n$7!$%W%m%8%'%/%H$N6&F1:n6H<T$K$OF10l%^%7%s>e(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
172 $B$N6&M-%o!<%/%9%Z!<%9$X$N%"%/%;%9$,I,MW$G$"$C$?!%%U%!%$%k$X$N%"%/%;%9$ND4(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
173 $BDd$O%m%C%/$K$h$C$F9T$o$l!$$"$k%U%!%$%k$rJQ99$G$-$k$N$O>o$K0l?M$N%f!<%6$@(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
174 $B$1$G$"$C$?!%%U%!%$%k$r%m%C%/$7$?8e!$%m%C%/$N2r=|$rK:$l$k$3$H$OF|>oE*$K$"(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
175 $B$j!$$3$&$J$k$H4IM}<T$N=u$1$J$7$KB>$N3+H/<T$,%U%!%$%k$rJQ99$9$k$3$H$O$G$-(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
176 $B$J$+$C$?!%(B
218
75fd236d736b History of SCM tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 217
diff changeset
177
386
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
178 %Walter Tichy developed a free alternative to SCCS in the early 1980s;
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
179 %he called his program RCS (Revison Control System). Like SCCS, RCS
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
180 %required developers to work in a single shared workspace, and to lock
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
181 %files to prevent multiple people from modifying them simultaneously.
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
182
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
183 Walter Tichy$B$O!$(B1980$BG/Be=iF,$K(BSCCS$B$NBeBX$H$J$k%U%j!<$N%P!<%8%g%s%3%s%H%m!<(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
184 $B%k%D!<%k$r3+H/$7$?!%H`$O<+$i$N%7%9%F%`$r(BRCS (Revison Control System)$B$H8F(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
185 $B$s$@!%(BSCCS$BF1MM!$(BRCS$B$O3+H/<T$?$A$KC10l$N6&M-%o!<%/%9%Z!<%9$H!$%U%!%$%k$rF1(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
186 $B;~$KJ#?t?M$,JQ99$9$k$3$H$N$J$$$h$&$K%m%C%/$rMW5a$7$?!%(B
218
75fd236d736b History of SCM tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 217
diff changeset
187
386
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
188 %Later in the 1980s, Dick Grune used RCS as a building block for a set
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
189 %of shell scripts he initially called cmt, but then renamed to CVS
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
190 %(Concurrent Versions System). The big innovation of CVS was that it
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
191 %let developers work simultaneously and somewhat independently in their
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
192 %own personal workspaces. The personal workspaces prevented developers
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
193 %from stepping on each other's toes all the time, as was common with
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
194 %SCCS and RCS. Each developer had a copy of every project file, and
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
195 %could modify their copies independently. They had to merge their
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
196 %edits prior to committing changes to the central repository.
218
75fd236d736b History of SCM tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 217
diff changeset
197
386
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
198 1980$BG/Be8eH>$K(BDick Grune$B$O(BRCS$B$r8F$S=P$9%7%'%k%9%/%j%W%H$K$h$k%P!<%8%g%s4I(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
199 $BM}%7%9%F%`$r:n$C$?!%=i4|$K(Bcmt$B$H8F$P$l$?$3$N%7%9%F%`$O!$8e$K(BCVS
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
200 (Concurrent Versions System)$B$H2~L>$5$l$?!%(B CVS$B$NBg$-$J3W?7$O!$3+H/<TC#$K(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
201 $BF1;~$K8DJL$N%o!<%/%9%Z!<%9$G:n6H$9$k$3$H$r5v$7$?$3$H$G$"$k!%%o!<%/%9%Z!<(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
202 $B%9$r8DJL$K$7$?$3$H$G!$3+H/<T$O(BSCCS$B$d(BRCS$B$GNI$/$"$C$?$h$&$K!$B>$N3+H/<T$N:n(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
203 $B6H$rK8$2$k$3$H$,$J$/$J$C$?!%$3$N%b%G%k$G$O!$Cf1{$N%j%]%8%H%j$KJQ99$r%3%_%C(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
204 $B%H$9$kA0$K!$JQ997k2L$r%^!<%8$9$kI,MW$,$"$C$?!%(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
205
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
206 %Brian Berliner took Grune's original scripts and rewrote them in~C,
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
207 %releasing in 1989 the code that has since developed into the modern
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
208 %version of CVS. CVS subsequently acquired the ability to operate over
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
209 %a network connection, giving it a client/server architecture. CVS's
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
210 %architecture is centralised; only the server has a copy of the history
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
211 %of the project. Client workspaces just contain copies of recent
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
212 %versions of the project's files, and a little metadata to tell them
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
213 %where the server is. CVS has been enormously successful; it is
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
214 %probably the world's most widely used revision control system.
155
914babdc99c8 run-example: better error if bogus section name found.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
215
386
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
216 Brian Berliner$B$O(BGrune$B$N%*%j%8%J%k%9%/%j%W%H$r<u$17Q$$$G!$$=$l$r(BC$B$G=q$-D>(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
217 $B$7!$8=:_$N(BCVS$B$X$H7R$,$k%3!<%I$r(B1989$BG/$K%j%j!<%9$7$?!%$=$N8e!$(BCVS$B$O%M%C%H(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
218 $B%o!<%/$r7PM3$7$?F0:n$d!$%/%i%$%"%s%H%5!<%P%"!<%-%F%/%A%c$rHw$($F$$$C(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
219 $B$?!%(BCVS$B$N%"!<%-%F%/%A%c$OCf1{=8Cf7?$G!$%5!<%P$N$_$,%W%m%8%'%/%H$NMzNr$rJ](B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
220 $BB8$9$k!%%/%i%$%"%s%H$N%o!<%/%9%Z!<%9$O%W%m%8%'%/%H$N:G?7%P!<%8%g%s$N%U%!(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
221 $B%$%k$N%3%T!<$G$"$j!$%5!<%P$N=j:_$r<($96O$+$J%a%?%G!<%?$,IU2C$5$l$F$$$?!%(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
222 CVS$B$OBg@.8y$r<}$a!$$*$=$i$/@$3&$G:G$b9-$/MQ$$$i$l$?%j%S%8%g%s%3%s%H%m!<%k(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
223 $B%7%9%F%`$H$J$C$?!%(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
224
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
225 %In the early 1990s, Sun Microsystems developed an early distributed
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
226 %revision control system, called TeamWare. A TeamWare workspace
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
227 %contains a complete copy of the project's history. TeamWare has no
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
228 %notion of a central repository. (CVS relied upon RCS for its history
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
229 %storage; TeamWare used SCCS.)
218
75fd236d736b History of SCM tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 217
diff changeset
230
386
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
231 1990$BG/Be=iF,!$(BSun Microsystems$B$O(BTeamWare$B$H8F$P$l$k=i4|$NJ,;6%j%S%8%g%s%3(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
232 $B%s%H%m!<%k%7%9%F%`$r3+H/$7$?!%(BTeamWare$B%o!<%/%9%Z!<%9$O%W%m%8%'%/%H$NMzNr(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
233 $B$N40A4$J%3%T!<$r;}$C$F$$$?!%(BTeamWare$B$K$OCf1{%j%]%8%H%j$H$$$&35G0$O$J$+$C(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
234 $B$?!%!J(BCVS$B$,MzNr$N5-O?$K(BRCS$B$r;H$C$F$$$?$h$&$K!$(BTeamWare$B$O(BSCCS$B$rMQ$$$F$$(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
235 $B$?!%!K(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
236
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
237 %As the 1990s progressed, awareness grew of a number of problems with
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
238 %CVS. It records simultaneous changes to multiple files individually,
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
239 %instead of grouping them together as a single logically atomic
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
240 %operation. It does not manage its file hierarchy well; it is easy to
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
241 %make a mess of a repository by renaming files and directories. Worse,
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
242 %its source code is difficult to read and maintain, which made the
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
243 %``pain level'' of fixing these architectural problems prohibitive.
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
244
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
245 1990$BG/BeCf:"$K$J$k$H!$(BCVS$B$NLdBj$,9-$/CN$i$l$k$h$&$K$J$C$F$-$?!%(B CVS$B$O0lEY(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
246 $B$KJ#?t$N%U%!%$%k$KBP$7$F9T$o$l$kJQ99$rO@M}E*$K%"%H%_%C%/$JA`:n$H$7$F%0%k!<(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
247 $B%W2=$9$k$N$G$O$J$/!$%U%!%$%kKh$K8DJL$K5-O?$7$F$$$?!%(BCVS$B$N%U%!%$%k%R%(%i%k(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
248 $B%-!<$N4IM}$OIT==J,$G!$%U%!%$%k$d%G%#%l%/%H%j$r%j%M!<%`$9$k$H4JC1$K%j%]%8(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
249 $B%H%j$,:.Mp$7$?!%$5$i$K0-$$$3$H$K!$(BCVS$B$N%=!<%9%3!<%I$OFI$_$K$/$/!$%a%s%F%J(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
250 $B%s%9$bFq$7$+$C$?$?$a!$%"!<%-%F%/%A%c$NLdBj$r2r7h$9$k$N$OIT2DG=$J%l%Y%k$H(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
251 $B8@$($?!%(B
218
75fd236d736b History of SCM tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 217
diff changeset
252
386
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
253 %In 2001, Jim Blandy and Karl Fogel, two developers who had worked on
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
254 %CVS, started a project to replace it with a tool that would have a
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
255 %better architecture and cleaner code. The result, Subversion, does
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
256 %not stray from CVS's centralised client/server model, but it adds
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
257 %multi-file atomic commits, better namespace management, and a number
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
258 %of other features that make it a generally better tool than CVS.
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
259 %Since its initial release, it has rapidly grown in popularity.
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
260
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
261 2001$BG/!$(BCVS$B$r3+H/$7$F$$$?(BJim Blandy$B$H(BKarl Fogel$B$N(B2$B?M$N3+H/<T$,(BCVS$B$rCV$-49(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
262 $B$($k!$$h$jM%$l$?%"!<%-%F%/%A%c$H4qNo$J%3!<%I$r;}$D%D!<%k$N%W%m%8%'%/%H$r(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
263 $B;O$a$?!%$=$N@.2LJ*$G$"$k(BSubversion$B$O(BCVS$B$N=8Cf7?%/%i%$%"%s%H%5!<%P%b%G%k$r(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
264 $B2~$a$k$3$H$O$7$J$+$C$?$,!$J#?t%U%!%$%k$N%"%H%_%C%/$J%3%_%C%H$rDI2C$7!$L>(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
265 $BA06u4V$N4IM}$b2~NI$7$F$$$?!%$^$?(BCVS$B$h$j$bM%$l$??tB?$/$N5!G=$bDI2C$5$l$?!%(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
266 Subversion$B$O:G=i$N%j%j!<%9$+$i5^B.$K?M5$$r3MF@$7$F$$$C$?!%(B
218
75fd236d736b History of SCM tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 217
diff changeset
267
386
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
268 %More or less simultaneously, Graydon Hoare began working on an
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
269 %ambitious distributed revision control system that he named Monotone.
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
270 %While Monotone addresses many of CVS's design flaws and has a
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
271 %peer-to-peer architecture, it goes beyond earlier (and subsequent)
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
272 %revision control tools in a number of innovative ways. It uses
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
273 %cryptographic hashes as identifiers, and has an integral notion of
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
274 %``trust'' for code from different sources.
218
75fd236d736b History of SCM tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 217
diff changeset
275
386
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
276 $B$[$\;~$rF1$8$/$7$F!$(BGraydon Hoare$B$O(BMonotone$B$H8F$P$l$kLn?4E*$JJ,;6%j%S%8%g(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
277 $B%s%3%s%H%m!<%k%7%9%F%`$N3+H/$r;O$a$?!%(BMonotone$B$O(BCVS$B$N?tB?$/$N@_7W>e$N`laS(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
278 $B$r=$@5$7!$%T%"%D!<%T%"%"!<%-%F%/%A%c$r;}$C$F$$$k!%(B Monotone$B$O=i4|$N!J$"$k(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
279 $B$$$O8eB3$N!K%j%S%8%g%s%3%s%H%m!<%k%D!<%k$h$j$b@h?JE*$J5!G=$r;}$C$F$$(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
280 $B$k!%(BMonotone$B$O0E9f2=$5$l$?%O%C%7%e$r<1JL;R$H$7$F;HMQ$7!$MM!9$J=P=h$N%3!<(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
281 $B%I$KBP$7$F(B``$B?.Mj@-(B''$B$N35G0$r;}$C$F$$$?!%(B
218
75fd236d736b History of SCM tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 217
diff changeset
282
386
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
283 %Mercurial began life in 2005. While a few aspects of its design are
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
284 %influenced by Monotone, Mercurial focuses on ease of use, high
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
285 %performance, and scalability to very large projects.
155
914babdc99c8 run-example: better error if bogus section name found.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
286
386
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
287 Mercurial$B$O(B2005$BG/$KCB@8$7$?!%%G%6%$%s$N$$$/$D$+$NLL$O(BMonotone$B$K1F6A$r<u$1(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
288 $B$F$$$k$,!$(BMercurial$B$O;H$$$d$9$5!$9b@-G=!$Bg5,LO%W%m%8%'%/%H$X$N%9%1!<%i%S(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
289 $B%j%F%#$K%U%)!<%+%9$7$F$$$k!%(B
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
290
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
291 %\section{Trends in revision control}
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
292 \section{$B%j%S%8%g%s%3%s%H%m!<%k$N%H%l%s%I(B}
219
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
293
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
294 There has been an unmistakable trend in the development and use of
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
295 revision control tools over the past four decades, as people have
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
296 become familiar with the capabilities of their tools and constrained
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
297 by their limitations.
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
298
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
299 The first generation began by managing single files on individual
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
300 computers. Although these tools represented a huge advance over
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
301 ad-hoc manual revision control, their locking model and reliance on a
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
302 single computer limited them to small, tightly-knit teams.
155
914babdc99c8 run-example: better error if bogus section name found.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
303
219
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
304 The second generation loosened these constraints by moving to
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
305 network-centered architectures, and managing entire projects at a
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
306 time. As projects grew larger, they ran into new problems. With
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
307 clients needing to talk to servers very frequently, server scaling
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
308 became an issue for large projects. An unreliable network connection
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
309 could prevent remote users from being able to talk to the server at
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
310 all. As open source projects started making read-only access
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
311 available anonymously to anyone, people without commit privileges
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
312 found that they could not use the tools to interact with a project in
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
313 a natural way, as they could not record their changes.
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
314
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
315 The current generation of revision control tools is peer-to-peer in
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
316 nature. All of these systems have dropped the dependency on a single
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
317 central server, and allow people to distribute their revision control
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
318 data to where it's actually needed. Collaboration over the Internet
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
319 has moved from constrained by technology to a matter of choice and
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
320 consensus. Modern tools can operate offline indefinitely and
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
321 autonomously, with a network connection only needed when syncing
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
322 changes with another repository.
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
323
386
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
324 %\section{A few of the advantages of distributed revision control}
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
325 \section{$BJ,;6%j%S%8%g%s%3%s%H%m!<%k$NMxE@(B}
155
914babdc99c8 run-example: better error if bogus section name found.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
326
219
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
327 Even though distributed revision control tools have for several years
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
328 been as robust and usable as their previous-generation counterparts,
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
329 people using older tools have not yet necessarily woken up to their
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
330 advantages. There are a number of ways in which distributed tools
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
331 shine relative to centralised ones.
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
332
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
333 For an individual developer, distributed tools are almost always much
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
334 faster than centralised tools. This is for a simple reason: a
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
335 centralised tool needs to talk over the network for many common
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
336 operations, because most metadata is stored in a single copy on the
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
337 central server. A distributed tool stores all of its metadata
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
338 locally. All else being equal, talking over the network adds overhead
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
339 to a centralised tool. Don't underestimate the value of a snappy,
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
340 responsive tool: you're going to spend a lot of time interacting with
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
341 your revision control software.
155
914babdc99c8 run-example: better error if bogus section name found.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
342
219
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
343 Distributed tools are indifferent to the vagaries of your server
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
344 infrastructure, again because they replicate metadata to so many
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
345 locations. If you use a centralised system and your server catches
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
346 fire, you'd better hope that your backup media are reliable, and that
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
347 your last backup was recent and actually worked. With a distributed
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
348 tool, you have many backups available on every contributor's computer.
155
914babdc99c8 run-example: better error if bogus section name found.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
349
219
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
350 The reliability of your network will affect distributed tools far less
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
351 than it will centralised tools. You can't even use a centralised tool
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
352 without a network connection, except for a few highly constrained
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
353 commands. With a distributed tool, if your network connection goes
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
354 down while you're working, you may not even notice. The only thing
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
355 you won't be able to do is talk to repositories on other computers,
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
356 something that is relatively rare compared with local operations. If
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
357 you have a far-flung team of collaborators, this may be significant.
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
358
386
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
359 %\subsection{Advantages for open source projects}
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
360 \subsection{$B%*!<%W%s%=!<%9%W%m%8%'%/%H$G$NMxE@(B}
220
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
361
219
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
362 If you take a shine to an open source project and decide that you
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
363 would like to start hacking on it, and that project uses a distributed
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
364 revision control tool, you are at once a peer with the people who
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
365 consider themselves the ``core'' of that project. If they publish
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
366 their repositories, you can immediately copy their project history,
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
367 start making changes, and record your work, using the same tools in
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
368 the same ways as insiders. By contrast, with a centralised tool, you
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
369 must use the software in a ``read only'' mode unless someone grants
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
370 you permission to commit changes to their central server. Until then,
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
371 you won't be able to record changes, and your local modifications will
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
372 be at risk of corruption any time you try to update your client's view
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
373 of the repository.
155
914babdc99c8 run-example: better error if bogus section name found.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
374
386
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
375 %\subsubsection{The forking non-problem}
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
376 \subsubsection{$BLdBj$J$/%U%)!<%/2DG=(B}
220
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
377
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
378 It has been suggested that distributed revision control tools pose
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
379 some sort of risk to open source projects because they make it easy to
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
380 ``fork'' the development of a project. A fork happens when there are
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
381 differences in opinion or attitude between groups of developers that
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
382 cause them to decide that they can't work together any longer. Each
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
383 side takes a more or less complete copy of the project's source code,
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
384 and goes off in its own direction.
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
385
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
386 Sometimes the camps in a fork decide to reconcile their differences.
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
387 With a centralised revision control system, the \emph{technical}
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
388 process of reconciliation is painful, and has to be performed largely
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
389 by hand. You have to decide whose revision history is going to
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
390 ``win'', and graft the other team's changes into the tree somehow.
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
391 This usually loses some or all of one side's revision history.
155
914babdc99c8 run-example: better error if bogus section name found.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
392
220
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
393 What distributed tools do with respect to forking is they make forking
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
394 the \emph{only} way to develop a project. Every single change that
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
395 you make is potentially a fork point. The great strength of this
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
396 approach is that a distributed revision control tool has to be really
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
397 good at \emph{merging} forks, because forks are absolutely
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
398 fundamental: they happen all the time.
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
399
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
400 If every piece of work that everybody does, all the time, is framed in
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
401 terms of forking and merging, then what the open source world refers
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
402 to as a ``fork'' becomes \emph{purely} a social issue. If anything,
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
403 distributed tools \emph{lower} the likelihood of a fork:
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
404 \begin{itemize}
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
405 \item They eliminate the social distinction that centralised tools
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
406 impose: that between insiders (people with commit access) and
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
407 outsiders (people without).
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
408 \item They make it easier to reconcile after a social fork, because
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
409 all that's involved from the perspective of the revision control
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
410 software is just another merge.
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
411 \end{itemize}
155
914babdc99c8 run-example: better error if bogus section name found.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
412
220
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
413 Some people resist distributed tools because they want to retain tight
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
414 control over their projects, and they believe that centralised tools
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
415 give them this control. However, if you're of this belief, and you
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
416 publish your CVS or Subversion repositories publically, there are
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
417 plenty of tools available that can pull out your entire project's
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
418 history (albeit slowly) and recreate it somewhere that you don't
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
419 control. So while your control in this case is illusory, you are
263
9dbed77d3ba6 Fix typo
Tong-Kiat Tan <tktan@jokey.org>
parents: 256
diff changeset
420 forgoing the ability to fluidly collaborate with whatever people feel
220
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
421 compelled to mirror and fork your history.
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
422
386
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
423 %\subsection{Advantages for commercial projects}
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
424 \subsection{$B>&MQ%W%m%8%'%/%H$G$NMxE@(B}
155
914babdc99c8 run-example: better error if bogus section name found.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
425
220
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
426 Many commercial projects are undertaken by teams that are scattered
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
427 across the globe. Contributors who are far from a central server will
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
428 see slower command execution and perhaps less reliability. Commercial
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
429 revision control systems attempt to ameliorate these problems with
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
430 remote-site replication add-ons that are typically expensive to buy
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
431 and cantankerous to administer. A distributed system doesn't suffer
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
432 from these problems in the first place. Better yet, you can easily
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
433 set up multiple authoritative servers, say one per site, so that
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
434 there's no redundant communication between repositories over expensive
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
435 long-haul network links.
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
436
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
437 Centralised revision control systems tend to have relatively low
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
438 scalability. It's not unusual for an expensive centralised system to
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
439 fall over under the combined load of just a few dozen concurrent
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
440 users. Once again, the typical response tends to be an expensive and
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
441 clunky replication facility. Since the load on a central server---if
280
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
442 you have one at all---is many times lower with a distributed
220
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
443 tool (because all of the data is replicated everywhere), a single
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
444 cheap server can handle the needs of a much larger team, and
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
445 replication to balance load becomes a simple matter of scripting.
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
446
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
447 If you have an employee in the field, troubleshooting a problem at a
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
448 customer's site, they'll benefit from distributed revision control.
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
449 The tool will let them generate custom builds, try different fixes in
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
450 isolation from each other, and search efficiently through history for
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
451 the sources of bugs and regressions in the customer's environment, all
0ca9045035f7 Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 219
diff changeset
452 without needing to connect to your company's network.
219
15a6fd2ba582 Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 218
diff changeset
453
386
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
454 %\section{Why choose Mercurial?}
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
455 \section{Mercurial$B$rA*$VM}M3(B}
155
914babdc99c8 run-example: better error if bogus section name found.
Bryan O'Sullivan <bos@serpentine.com>
parents: 16
diff changeset
456
221
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
457 Mercurial has a unique set of properties that make it a particularly
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
458 good choice as a revision control system.
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
459 \begin{itemize}
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
460 \item It is easy to learn and use.
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
461 \item It is lightweight.
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
462 \item It scales excellently.
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
463 \item It is easy to customise.
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
464 \end{itemize}
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
465
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
466 If you are at all familiar with revision control systems, you should
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
467 be able to get up and running with Mercurial in less than five
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
468 minutes. Even if not, it will take no more than a few minutes
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
469 longer. Mercurial's command and feature sets are generally uniform
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
470 and consistent, so you can keep track of a few general rules instead
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
471 of a host of exceptions.
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
472
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
473 On a small project, you can start working with Mercurial in moments.
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
474 Creating new changes and branches; transferring changes around
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
475 (whether locally or over a network); and history and status operations
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
476 are all fast. Mercurial attempts to stay nimble and largely out of
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
477 your way by combining low cognitive overhead with blazingly fast
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
478 operations.
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
479
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
480 The usefulness of Mercurial is not limited to small projects: it is
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
481 used by projects with hundreds to thousands of contributors, each
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
482 containing tens of thousands of files and hundreds of megabytes of
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
483 source code.
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
484
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
485 If the core functionality of Mercurial is not enough for you, it's
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
486 easy to build on. Mercurial is well suited to scripting tasks, and
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
487 its clean internals and implementation in Python make it easy to add
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
488 features in the form of extensions. There are a number of popular and
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
489 useful extensions already available, ranging from helping to identify
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
490 bugs to improving performance.
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
491
386
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
492 %\section{Mercurial compared with other tools}
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
493 \section{Mercurial$B$HB>$N%D!<%k$NHf3S(B}
221
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
494
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
495 Before you read on, please understand that this section necessarily
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
496 reflects my own experiences, interests, and (dare I say it) biases. I
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
497 have used every one of the revision control tools listed below, in
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
498 most cases for several years at a time.
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
499
280
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
500
221
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
501 \subsection{Subversion}
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
502
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
503 Subversion is a popular revision control tool, developed to replace
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
504 CVS. It has a centralised client/server architecture.
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
505
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
506 Subversion and Mercurial have similarly named commands for performing
280
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
507 the same operations, so if you're familiar with one, it is easy to
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
508 learn to use the other. Both tools are portable to all popular
221
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
509 operating systems.
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
510
256
649a93bb45ae Fiddle with the sections on SVN and CVS.
Bryan O'Sullivan <bos@serpentine.com>
parents: 221
diff changeset
511 Subversion lacks a history-aware merge capability, forcing its users
649a93bb45ae Fiddle with the sections on SVN and CVS.
Bryan O'Sullivan <bos@serpentine.com>
parents: 221
diff changeset
512 to manually track exactly which revisions have been merged between
649a93bb45ae Fiddle with the sections on SVN and CVS.
Bryan O'Sullivan <bos@serpentine.com>
parents: 221
diff changeset
513 branches. If users fail to do this, or make mistakes, they face the
649a93bb45ae Fiddle with the sections on SVN and CVS.
Bryan O'Sullivan <bos@serpentine.com>
parents: 221
diff changeset
514 prospect of manually resolving merges with unnecessary conflicts.
280
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
515 Subversion also fails to merge changes when files or directories are
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
516 renamed. Subversion's poor merge support is its single biggest
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
517 weakness.
256
649a93bb45ae Fiddle with the sections on SVN and CVS.
Bryan O'Sullivan <bos@serpentine.com>
parents: 221
diff changeset
518
221
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
519 Mercurial has a substantial performance advantage over Subversion on
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
520 every revision control operation I have benchmarked. I have measured
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
521 its advantage as ranging from a factor of two to a factor of six when
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
522 compared with Subversion~1.4.3's \emph{ra\_local} file store, which is
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
523 the fastest access method available). In more realistic deployments
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
524 involving a network-based store, Subversion will be at a substantially
256
649a93bb45ae Fiddle with the sections on SVN and CVS.
Bryan O'Sullivan <bos@serpentine.com>
parents: 221
diff changeset
525 larger disadvantage. Because many Subversion commands must talk to
649a93bb45ae Fiddle with the sections on SVN and CVS.
Bryan O'Sullivan <bos@serpentine.com>
parents: 221
diff changeset
526 the server and Subversion does not have useful replication facilities,
280
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
527 server capacity and network bandwidth become bottlenecks for modestly
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
528 large projects.
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
529
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
530 Additionally, Subversion incurs substantial storage overhead to avoid
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
531 network transactions for a few common operations, such as finding
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
532 modified files (\texttt{status}) and displaying modifications against
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
533 the current revision (\texttt{diff}). As a result, a Subversion
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
534 working copy is often the same size as, or larger than, a Mercurial
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
535 repository and working directory, even though the Mercurial repository
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
536 contains a complete history of the project.
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
537
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
538 Subversion is widely supported by third party tools. Mercurial
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
539 currently lags considerably in this area. This gap is closing,
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
540 however, and indeed some of Mercurial's GUI tools now outshine their
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
541 Subversion equivalents. Like Mercurial, Subversion has an excellent
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
542 user manual.
221
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
543
280
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
544 Because Subversion doesn't store revision history on the client, it is
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
545 well suited to managing projects that deal with lots of large, opaque
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
546 binary files. If you check in fifty revisions to an incompressible
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
547 10MB file, Subversion's client-side space usage stays constant The
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
548 space used by any distributed SCM will grow rapidly in proportion to
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
549 the number of revisions, because the differences between each revision
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
550 are large.
221
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
551
280
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
552 In addition, it's often difficult or, more usually, impossible to
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
553 merge different versions of a binary file. Subversion's ability to
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
554 let a user lock a file, so that they temporarily have the exclusive
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
555 right to commit changes to it, can be a significant advantage to a
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
556 project where binary files are widely used.
221
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
557
280
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
558 Mercurial can import revision history from a Subversion repository.
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
559 It can also export revision history to a Subversion repository. This
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
560 makes it easy to ``test the waters'' and use Mercurial and Subversion
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
561 in parallel before deciding to switch. History conversion is
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
562 incremental, so you can perform an initial conversion, then small
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
563 additional conversions afterwards to bring in new changes.
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
564
221
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
565
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
566 \subsection{Git}
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
567
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
568 Git is a distributed revision control tool that was developed for
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
569 managing the Linux kernel source tree. Like Mercurial, its early
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
570 design was somewhat influenced by Monotone.
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
571
280
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
572 Git has a very large command set, with version~1.5.0 providing~139
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
573 individual commands. It has something of a reputation for being
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
574 difficult to learn. Compared to Git, Mercurial has a strong focus on
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
575 simplicity.
221
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
576
280
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
577 In terms of performance, Git is extremely fast. In several cases, it
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
578 is faster than Mercurial, at least on Linux, while Mercurial performs
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
579 better on other operations. However, on Windows, the performance and
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
580 general level of support that Git provides is, at the time of writing,
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
581 far behind that of Mercurial.
221
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
582
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
583 While a Mercurial repository needs no maintenance, a Git repository
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
584 requires frequent manual ``repacks'' of its metadata. Without these,
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
585 performance degrades, while space usage grows rapidly. A server that
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
586 contains many Git repositories that are not rigorously and frequently
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
587 repacked will become heavily disk-bound during backups, and there have
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
588 been instances of daily backups taking far longer than~24 hours as a
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
589 result. A freshly packed Git repository is slightly smaller than a
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
590 Mercurial repository, but an unpacked repository is several orders of
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
591 magnitude larger.
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
592
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
593 The core of Git is written in C. Many Git commands are implemented as
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
594 shell or Perl scripts, and the quality of these scripts varies widely.
280
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
595 I have encountered several instances where scripts charged along
221
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
596 blindly in the presence of errors that should have been fatal.
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
597
280
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
598 Mercurial can import revision history from a Git repository.
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
599
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
600
221
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
601 \subsection{CVS}
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
602
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
603 CVS is probably the most widely used revision control tool in the
280
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
604 world. Due to its age and internal untidiness, it has been only
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
605 lightly maintained for many years.
221
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
606
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
607 It has a centralised client/server architecture. It does not group
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
608 related file changes into atomic commits, making it easy for people to
256
649a93bb45ae Fiddle with the sections on SVN and CVS.
Bryan O'Sullivan <bos@serpentine.com>
parents: 221
diff changeset
609 ``break the build'': one person can successfully commit part of a
649a93bb45ae Fiddle with the sections on SVN and CVS.
Bryan O'Sullivan <bos@serpentine.com>
parents: 221
diff changeset
610 change and then be blocked by the need for a merge, causing other
649a93bb45ae Fiddle with the sections on SVN and CVS.
Bryan O'Sullivan <bos@serpentine.com>
parents: 221
diff changeset
611 people to see only a portion of the work they intended to do. This
649a93bb45ae Fiddle with the sections on SVN and CVS.
Bryan O'Sullivan <bos@serpentine.com>
parents: 221
diff changeset
612 also affects how you work with project history. If you want to see
649a93bb45ae Fiddle with the sections on SVN and CVS.
Bryan O'Sullivan <bos@serpentine.com>
parents: 221
diff changeset
613 all of the modifications someone made as part of a task, you will need
649a93bb45ae Fiddle with the sections on SVN and CVS.
Bryan O'Sullivan <bos@serpentine.com>
parents: 221
diff changeset
614 to manually inspect the descriptions and timestamps of the changes
649a93bb45ae Fiddle with the sections on SVN and CVS.
Bryan O'Sullivan <bos@serpentine.com>
parents: 221
diff changeset
615 made to each file involved (if you even know what those files were).
649a93bb45ae Fiddle with the sections on SVN and CVS.
Bryan O'Sullivan <bos@serpentine.com>
parents: 221
diff changeset
616
649a93bb45ae Fiddle with the sections on SVN and CVS.
Bryan O'Sullivan <bos@serpentine.com>
parents: 221
diff changeset
617 CVS has a muddled notion of tags and branches that I will not attempt
649a93bb45ae Fiddle with the sections on SVN and CVS.
Bryan O'Sullivan <bos@serpentine.com>
parents: 221
diff changeset
618 to even describe. It does not support renaming of files or
649a93bb45ae Fiddle with the sections on SVN and CVS.
Bryan O'Sullivan <bos@serpentine.com>
parents: 221
diff changeset
619 directories well, making it easy to corrupt a repository. It has
649a93bb45ae Fiddle with the sections on SVN and CVS.
Bryan O'Sullivan <bos@serpentine.com>
parents: 221
diff changeset
620 almost no internal consistency checking capabilities, so it is usually
649a93bb45ae Fiddle with the sections on SVN and CVS.
Bryan O'Sullivan <bos@serpentine.com>
parents: 221
diff changeset
621 not even possible to tell whether or how a repository is corrupt. I
649a93bb45ae Fiddle with the sections on SVN and CVS.
Bryan O'Sullivan <bos@serpentine.com>
parents: 221
diff changeset
622 would not recommend CVS for any project, existing or new.
221
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
623
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
624 Mercurial can import CVS revision history. However, there are a few
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
625 caveats that apply; these are true of every other revision control
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
626 tool's CVS importer, too. Due to CVS's lack of atomic changes and
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
627 unversioned filesystem hierarchy, it is not possible to reconstruct
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
628 CVS history completely accurately; some guesswork is involved, and
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
629 renames will usually not show up. Because a lot of advanced CVS
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
630 administration has to be done by hand and is hence error-prone, it's
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
631 common for CVS importers to run into multiple problems with corrupted
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
632 repositories (completely bogus revision timestamps and files that have
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
633 remained locked for over a decade are just two of the less interesting
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
634 problems I can recall from personal experience).
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
635
280
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
636 Mercurial can import revision history from a CVS repository.
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
637
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
638
386
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
639 %\subsection{Commercial tools}
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
640 \subsection{$B>&MQ%D!<%k(B}
221
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
641
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
642 Perforce has a centralised client/server architecture, with no
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
643 client-side caching of any data. Unlike modern revision control
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
644 tools, Perforce requires that a user run a command to inform the
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
645 server about every file they intend to edit.
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
646
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
647 The performance of Perforce is quite good for small teams, but it
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
648 falls off rapidly as the number of users grows beyond a few dozen.
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
649 Modestly large Perforce installations require the deployment of
680b7b055aa7 Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents: 220
diff changeset
650 proxies to cope with the load their users generate.
16
81454425eee9 Progress on a few fronts, mainly indexing and MQ chapter content
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
651
280
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
652
386
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
653 %\subsection{Choosing a revision control tool}
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
654 \subsection{$B%j%S%8%g%s%3%s%H%m!<%k%D!<%k$rA*$V(B}
280
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
655
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
656 With the exception of CVS, all of the tools listed above have unique
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
657 strengths that suit them to particular styles of work. There is no
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
658 single revision control tool that is best in all situations.
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
659
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
660 As an example, Subversion is a good choice for working with frequently
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
661 edited binary files, due to its centralised nature and support for
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
662 file locking. If you're averse to the command line, it currently has
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
663 better GUI support than other free revision control tools. However,
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
664 its poor merging is a substantial liability for busy projects with
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
665 overlapping development.
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
666
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
667 I personally find Mercurial's properties of simplicity, performance,
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
668 and good merge support to be a compelling combination that has served
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
669 me well for several years.
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
670
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
671
386
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
672 %\section{Switching from another tool to Mercurial}
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
673 \section{$BB>$N%D!<%k$+$i(BMercurial$B$X$N0\9T(B}
280
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
674
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
675 Mercurial is bundled with an extension named \hgext{convert}, which
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
676 can incrementally import revision history from several other revision
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
677 control tools. By ``incremental'', I mean that you can convert all of
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
678 a project's history to date in one go, then rerun the conversion later
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
679 to obtain new changes that happened after the initial conversion.
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
680
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
681 The revision control tools supported by \hgext{convert} are as
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
682 follows:
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
683 \begin{itemize}
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
684 \item Subversion
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
685 \item CVS
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
686 \item Git
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
687 \item Darcs
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
688 \end{itemize}
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
689
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
690 In addition, \hgext{convert} can export changes from Mercurial to
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
691 Subversion. This makes it possible to try Subversion and Mercurial in
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
692 parallel before committing to a switchover, without risking the loss
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
693 of any work.
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
694
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
695 The \hgxcmd{conver}{convert} command is easy to use. Simply point it
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
696 at the path or URL of the source repository, optionally give it the
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
697 name of the destination repository, and it will start working. After
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
698 the initial conversion, just run the same command again to import new
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
699 changes.
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
700
4700dd38384c Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents: 263
diff changeset
701
386
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
702 %%% Local Variables:
293
3b1291f24c0d - replaved latex-mode to yatex-mode
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 290
diff changeset
703 %%% mode: yatex
16
81454425eee9 Progress on a few fronts, mainly indexing and MQ chapter content
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
704 %%% TeX-master: "00book"
386
63060ad65ab8 started intro.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
705 %%% End: