Mercurial > hgbook
annotate ja/intro.tex @ 387:1604f2b2054b
more intro.tex
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Sun, 22 Feb 2009 00:48:17 +0900 |
parents | 63060ad65ab8 |
children | 2e072e3d8637 |
rev | line source |
---|---|
386 | 1 %\chapter{Introduction} |
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 | 5 %\section{About revision control} |
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 | 8 %Revision control is the process of managing multiple versions of a |
9 %piece of information. In its simplest form, this is something that | |
10 %many people do by hand: every time you modify a file, save it under a | |
11 %new name that contains a number, each one higher than the number of | |
12 %the preceding version. | |
13 | |
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 | |
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 | |
16 $BBg$-$J?t;z$r4^$`?7$?$JL>A0$G%;!<%V$r9T$&$J$I$NJ}K!$GA4$F<j$G9T$&$3$H$G$"(B | |
17 $B$k!%(B | |
217
369858a4d63c
Start to flesh out chapter 1.
Bryan O'Sullivan <bos@serpentine.com>
parents:
155
diff
changeset
|
18 |
386 | 19 %Manually managing multiple versions of even a single file is an |
20 %error-prone task, though, so software tools to help automate this | |
21 %process have long been available. The earliest automated revision | |
22 %control tools were intended to help a single user to manage revisions | |
23 %of a single file. Over the past few decades, the scope of revision | |
24 %control tools has expanded greatly; they now manage multiple files, | |
25 %and help multiple people to work together. The best modern revision | |
26 %control tools have no problem coping with thousands of people working | |
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 | 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 |
30 $B$$$r5/$3$70W$$:n6H$G!$$3$N%W%m%;%9$r<+F02=$9$k%=%U%H%&%'%"%D!<%k$,$+$J$j(B | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | 38 %\subsection{Why use revision control?} |
39 \subsection{$B$J$<%j%S%8%g%s%3%s%H%m!<%k$r;H$&$N$+(B?} | |
40 | |
41 %There are a number of reasons why you or your team might want to use | |
42 %an automated revision control tool for a project. | |
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 | |
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 | 46 %\item It will track the history and evolution of your project, so you |
47 % don't have to. For every change, you'll have a log of \emph{who} | |
48 % made it; \emph{why} they made it; \emph{when} they made it; and | |
49 % \emph{what} the change was. | |
50 \item $B%j%S%8%g%s4IM}%D!<%k$O!$%W%m%8%'%/%H$NMzNr$H?J2=$r5-O?$9$k$?$a!$<+(B | |
51 $BJ,<+?H$G5-O?$9$kI,MW$,$J$$!%A4$F$NJQ99$KBP$7$F(B\emph{$BC/$,(B}\emph{$B2?(B | |
52 $B$N$?$a$K(B}\emph{$B$$$D(B}\emph{$B2?$r(B}$BJQ99$7$?$N$+$,5-O?$5$l$k!%(B | |
53 %\item When you're working with other people, revision control software | |
54 % makes it easier for you to collaborate. For example, when people | |
55 % more or less simultaneously make potentially incompatible changes, | |
56 % the software will help you to identify and resolve those conflicts. | |
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 | |
58 $B:n6H$r=u$1$k!%Nc$($P!$?M!9$,F1;~$K8_49@-$N$J$$JQ99$r9T$C$?>l9g!$(B | |
59 $B%=%U%H%&%'%"$O%3%s%U%j%/%H$rFCDj$7!$2D7h$9$k$3$H$r=u$1$k!%(B | |
60 %\item It can help you to recover from mistakes. If you make a change | |
61 % that later turns out to be in error, you can revert to an earlier | |
62 % version of one or more files. In fact, a \emph{really} good | |
63 % revision control tool will even help you to efficiently figure out | |
64 % exactly when a problem was introduced (see | |
65 % section~\ref{sec:undo:bisect} for details). | |
66 \item $B%j%S%8%g%s4IM}%D!<%k$OHH$7$?%_%9$+$i$N2sI|$r=u$1$k!%2C$($?JQ99$,8e(B | |
67 $B$G4V0c$$$G$"$C$?$HJ,$+$C$?;~!$(B1$B$D$^$?$OJ#?t$N%U%!%$%k$X$NJQ99$rGK4~$9$k$3(B | |
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 | |
69 $BJ6$l9~$s$@LdBj$rFCDj$9$k$N$r;Y1g$9$k5!G=$r;}$D!%!J>\:Y$K$D$$$F(B | |
70 $B$O(B~\ref{sec:undo:bisect}$B@a$r;2>H!%!K(B | |
71 %\item It will help you to work simultaneously on, and manage the drift | |
72 % between, multiple versions of your project. | |
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 | |
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 | 76 %Most of these reasons are equally valid---at least in theory---whether |
77 %you're working on a project by yourself, or with a hundred other | |
78 %people. | |
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 | |
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 | 82 %A key question about the practicality of revision control at these two |
83 %different scales (``lone hacker'' and ``huge team'') is how its | |
84 %\emph{benefits} compare to its \emph{costs}. A revision control tool | |
85 %that's difficult to understand or use is going to impose a high cost. | |
86 | |
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 | |
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 | |
89 $B$$$F!$%3%9%H$KBP$7$F$I$l$@$1Mx1W$,$"$k$N$+$H$$$&$3$H$G$"$k!%M}2r$d;HMQ$,(B | |
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 | 92 %A five-hundred-person project is likely to collapse under its own |
93 %weight almost immediately without a revision control tool and process. | |
94 %In this case, the cost of using revision control might hardly seem | |
95 %worth considering, since \emph{without} it, failure is almost | |
96 %guaranteed. | |
218
75fd236d736b
History of SCM tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
217
diff
changeset
|
97 |
386 | 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 |
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 | |
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 | |
101 $B$J$i$J$$!%(Bxxx | |
102 | |
103 %On the other hand, a one-person ``quick hack'' might seem like a poor | |
104 %place to use a revision control tool, because surely the cost of using | |
105 %one must be close to the overall cost of the project. Right? | |
106 | |
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 | |
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 | |
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 | 111 %Mercurial uniquely supports \emph{both} of these scales of |
112 %development. You can learn the basics in just a few minutes, and due | |
113 %to its low overhead, you can apply revision control to the smallest of | |
114 %projects with ease. Its simplicity means you won't have a lot of | |
115 %abstruse concepts or command sequences competing for mental space with | |
116 %whatever you're \emph{really} trying to do. At the same time, | |
117 %Mercurial's high performance and peer-to-peer nature let you scale | |
118 %painlessly to handle large projects. | |
119 | |
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 | |
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 | |
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 | |
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 | |
124 $B$^$?F1;~$K(BMercurial$B$N@-G=$N9b$5$d!$%T%"%D!<%T%"$N@-<A$N$?$a$K!$Bg5,LO%W%m(B | |
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 | 127 %No revision control tool can rescue a poorly run project, but a good |
128 %choice of tools can make a huge difference to the fluidity with which | |
129 %you can work on a project. | |
130 | |
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 | |
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 | 134 %\subsection{The many names of revision control} |
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 | 137 %Revision control is a diverse field, so much so that it doesn't |
138 %actually have a single name or acronym. Here are a few of the more | |
139 %common names and acronyms you'll encounter: | |
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 | |
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 | 143 \item $B%j%S%8%g%s%3%s%H%m!<%k(B (Revision control (RCS)) |
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) | |
145 \item $B%=!<%9%3!<%I%^%M%8%a%s%H(B (Source code management) | |
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) | |
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 | 149 %Some people claim that these terms actually have different meanings, |
150 %but in practice they overlap so much that there's no agreed or even | |
151 %useful way to tease them apart. | |
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 | |
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 | |
154 $B$^$?M-MQ$G$b$J$$!%(B | |
155 | |
156 %\section{A short history of revision control} | |
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 | 159 %The best known of the old-time revision control tools is SCCS (Source |
160 %Code Control System), which Marc Rochkind wrote at Bell Labs, in the | |
161 %early 1970s. SCCS operated on individual files, and required every | |
162 %person working on a project to have access to a shared workspace on a | |
163 %single system. Only one person could modify a file at any time; | |
164 %arbitration for access to files was via locks. It was common for | |
165 %people to lock files, and later forget to unlock them, preventing | |
166 %anyone else from modifying those files without the help of an | |
167 %administrator. | |
168 | |
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 | |
170 $BBe=iF,$K(BBell$B8&5f=j$G=q$$$?(BSCCS (Source Code Control System)$B$G$"$k!%(B SCCS | |
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 | |
172 $B$N6&M-%o!<%/%9%Z!<%9$X$N%"%/%;%9$,I,MW$G$"$C$?!%%U%!%$%k$X$N%"%/%;%9$ND4(B | |
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 | |
174 $B$1$G$"$C$?!%%U%!%$%k$r%m%C%/$7$?8e!$%m%C%/$N2r=|$rK:$l$k$3$H$OF|>oE*$K$"(B | |
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 | |
176 $B$J$+$C$?!%(B | |
218
75fd236d736b
History of SCM tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
217
diff
changeset
|
177 |
386 | 178 %Walter Tichy developed a free alternative to SCCS in the early 1980s; |
179 %he called his program RCS (Revison Control System). Like SCCS, RCS | |
180 %required developers to work in a single shared workspace, and to lock | |
181 %files to prevent multiple people from modifying them simultaneously. | |
182 | |
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 | |
184 $B%k%D!<%k$r3+H/$7$?!%H`$O<+$i$N%7%9%F%`$r(BRCS (Revison Control System)$B$H8F(B | |
185 $B$s$@!%(BSCCS$BF1MM!$(BRCS$B$O3+H/<T$?$A$KC10l$N6&M-%o!<%/%9%Z!<%9$H!$%U%!%$%k$rF1(B | |
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 | 188 %Later in the 1980s, Dick Grune used RCS as a building block for a set |
189 %of shell scripts he initially called cmt, but then renamed to CVS | |
190 %(Concurrent Versions System). The big innovation of CVS was that it | |
191 %let developers work simultaneously and somewhat independently in their | |
192 %own personal workspaces. The personal workspaces prevented developers | |
193 %from stepping on each other's toes all the time, as was common with | |
194 %SCCS and RCS. Each developer had a copy of every project file, and | |
195 %could modify their copies independently. They had to merge their | |
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 | 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 |
199 $BM}%7%9%F%`$r:n$C$?!%=i4|$K(Bcmt$B$H8F$P$l$?$3$N%7%9%F%`$O!$8e$K(BCVS | |
200 (Concurrent Versions System)$B$H2~L>$5$l$?!%(B CVS$B$NBg$-$J3W?7$O!$3+H/<TC#$K(B | |
201 $BF1;~$K8DJL$N%o!<%/%9%Z!<%9$G:n6H$9$k$3$H$r5v$7$?$3$H$G$"$k!%%o!<%/%9%Z!<(B | |
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 | |
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 | |
204 $B%H$9$kA0$K!$JQ997k2L$r%^!<%8$9$kI,MW$,$"$C$?!%(B | |
205 | |
206 %Brian Berliner took Grune's original scripts and rewrote them in~C, | |
207 %releasing in 1989 the code that has since developed into the modern | |
208 %version of CVS. CVS subsequently acquired the ability to operate over | |
209 %a network connection, giving it a client/server architecture. CVS's | |
210 %architecture is centralised; only the server has a copy of the history | |
211 %of the project. Client workspaces just contain copies of recent | |
212 %versions of the project's files, and a little metadata to tell them | |
213 %where the server is. CVS has been enormously successful; it is | |
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 | 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 |
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 | |
218 $B%o!<%/$r7PM3$7$?F0:n$d!$%/%i%$%"%s%H%5!<%P%"!<%-%F%/%A%c$rHw$($F$$$C(B | |
219 $B$?!%(BCVS$B$N%"!<%-%F%/%A%c$OCf1{=8Cf7?$G!$%5!<%P$N$_$,%W%m%8%'%/%H$NMzNr$rJ](B | |
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 | |
221 $B%$%k$N%3%T!<$G$"$j!$%5!<%P$N=j:_$r<($96O$+$J%a%?%G!<%?$,IU2C$5$l$F$$$?!%(B | |
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 | |
223 $B%7%9%F%`$H$J$C$?!%(B | |
224 | |
225 %In the early 1990s, Sun Microsystems developed an early distributed | |
226 %revision control system, called TeamWare. A TeamWare workspace | |
227 %contains a complete copy of the project's history. TeamWare has no | |
228 %notion of a central repository. (CVS relied upon RCS for its history | |
229 %storage; TeamWare used SCCS.) | |
218
75fd236d736b
History of SCM tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
217
diff
changeset
|
230 |
386 | 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 |
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 | |
233 $B$N40A4$J%3%T!<$r;}$C$F$$$?!%(BTeamWare$B$K$OCf1{%j%]%8%H%j$H$$$&35G0$O$J$+$C(B | |
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 | |
235 $B$?!%!K(B | |
236 | |
237 %As the 1990s progressed, awareness grew of a number of problems with | |
238 %CVS. It records simultaneous changes to multiple files individually, | |
239 %instead of grouping them together as a single logically atomic | |
240 %operation. It does not manage its file hierarchy well; it is easy to | |
241 %make a mess of a repository by renaming files and directories. Worse, | |
242 %its source code is difficult to read and maintain, which made the | |
243 %``pain level'' of fixing these architectural problems prohibitive. | |
244 | |
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 | |
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 | |
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 | |
248 $B%-!<$N4IM}$OIT==J,$G!$%U%!%$%k$d%G%#%l%/%H%j$r%j%M!<%`$9$k$H4JC1$K%j%]%8(B | |
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 | |
250 $B%s%9$bFq$7$+$C$?$?$a!$%"!<%-%F%/%A%c$NLdBj$r2r7h$9$k$N$OIT2DG=$J%l%Y%k$H(B | |
251 $B8@$($?!%(B | |
218
75fd236d736b
History of SCM tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
217
diff
changeset
|
252 |
386 | 253 %In 2001, Jim Blandy and Karl Fogel, two developers who had worked on |
254 %CVS, started a project to replace it with a tool that would have a | |
255 %better architecture and cleaner code. The result, Subversion, does | |
256 %not stray from CVS's centralised client/server model, but it adds | |
257 %multi-file atomic commits, better namespace management, and a number | |
258 %of other features that make it a generally better tool than CVS. | |
259 %Since its initial release, it has rapidly grown in popularity. | |
260 | |
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 | |
262 $B$($k!$$h$jM%$l$?%"!<%-%F%/%A%c$H4qNo$J%3!<%I$r;}$D%D!<%k$N%W%m%8%'%/%H$r(B | |
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 | |
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 | |
265 $BA06u4V$N4IM}$b2~NI$7$F$$$?!%$^$?(BCVS$B$h$j$bM%$l$??tB?$/$N5!G=$bDI2C$5$l$?!%(B | |
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 | 268 %More or less simultaneously, Graydon Hoare began working on an |
269 %ambitious distributed revision control system that he named Monotone. | |
270 %While Monotone addresses many of CVS's design flaws and has a | |
271 %peer-to-peer architecture, it goes beyond earlier (and subsequent) | |
272 %revision control tools in a number of innovative ways. It uses | |
273 %cryptographic hashes as identifiers, and has an integral notion of | |
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 | 276 $B$[$\;~$rF1$8$/$7$F!$(BGraydon Hoare$B$O(BMonotone$B$H8F$P$l$kLn?4E*$JJ,;6%j%S%8%g(B |
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 | |
278 $B$r=$@5$7!$%T%"%D!<%T%"%"!<%-%F%/%A%c$r;}$C$F$$$k!%(B Monotone$B$O=i4|$N!J$"$k(B | |
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 | |
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 | |
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 | 283 %Mercurial began life in 2005. While a few aspects of its design are |
284 %influenced by Monotone, Mercurial focuses on ease of use, high | |
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 | 287 Mercurial$B$O(B2005$BG/$KCB@8$7$?!%%G%6%$%s$N$$$/$D$+$NLL$O(BMonotone$B$K1F6A$r<u$1(B |
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 | |
289 $B%j%F%#$K%U%)!<%+%9$7$F$$$k!%(B | |
290 | |
291 %\section{Trends in revision control} | |
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 |
387 | 294 %There has been an unmistakable trend in the development and use of |
295 %revision control tools over the past four decades, as people have | |
296 %become familiar with the capabilities of their tools and constrained | |
297 %by their limitations. | |
298 | |
299 $B%j%S%8%g%s%3%s%H%m!<%k%D!<%k$N3+H/$H;HMQ$K$*$$$F!$2a5n(B20$BG/4V%D!<%k$K?F$7(B | |
300 $B$_!$%D!<%k$N@)8B$rCN$k$K=>$C$F!$J6$l$b$J$$%H%l%s%I$,B8:_$7$F$$$k!%(B | |
219
15a6fd2ba582
Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
218
diff
changeset
|
301 |
387 | 302 %The first generation began by managing single files on individual |
303 %computers. Although these tools represented a huge advance over | |
304 %ad-hoc manual revision control, their locking model and reliance on a | |
305 %single computer limited them to small, tightly-knit teams. | |
306 | |
307 $BBh0l@$Be$N%D!<%k$OC10l$N%U%!%$%k$r8DJL$N%3%s%T%e!<%?$N>e$G4IM}$7$?!%%"%I(B | |
308 $B%[%C%/$J<jF0$K$h$k%j%S%8%g%s%3%s%H%m!<%k$HHf$Y$FBgI}$J?JJb$,$"$C$?$,!$%m%C(B | |
309 $B%/%b%G%k$HC10l%3%s%T%e!<%?$X$N0MB8$N$?$a!$MxMQ$O>.5,LO$G6[L)$J%A!<%`$K8B(B | |
310 $B$i$l$?!%(B | |
155
914babdc99c8
run-example: better error if bogus section name found.
Bryan O'Sullivan <bos@serpentine.com>
parents:
16
diff
changeset
|
311 |
387 | 312 %The second generation loosened these constraints by moving to |
313 %network-centered architectures, and managing entire projects at a | |
314 %time. As projects grew larger, they ran into new problems. With | |
315 %clients needing to talk to servers very frequently, server scaling | |
316 %became an issue for large projects. An unreliable network connection | |
317 %could prevent remote users from being able to talk to the server at | |
318 %all. As open source projects started making read-only access | |
319 %available anonymously to anyone, people without commit privileges | |
320 %found that they could not use the tools to interact with a project in | |
321 %a natural way, as they could not record their changes. | |
219
15a6fd2ba582
Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
218
diff
changeset
|
322 |
387 | 323 $BBhFs@$Be$N%D!<%k$O!$%M%C%H%o!<%/Cf?4$N%"!<%-%F%/%A%c$K0\9T$9$k$3$H$G!$$=(B |
324 $B$l$^$G$N@)8B$r4KOB$7!$%W%m%8%'%/%HA4BN$rF1;~$K4IM}$7$?!%%W%m%8%'%/%H$,Bg(B | |
325 $B$-$/@.D9$9$k$H!$?7$?$JLdBj$KD>LL$7$?!%%/%i%$%"%s%H$,%5!<%P$KIQHK$KDL?.$9(B | |
326 $B$k$?$a!$Bg5,LO%W%m%8%'%/%H$G$O%5!<%P$N5,LO$,LdBj$K$J$C$?!%?.Mj@-$N$J$$%M%C(B | |
327 $B%H%o!<%/@\B3$O%j%b!<%H%f!<%6$,%5!<%P$HDL?.$9$k$N$rK8$2$?!%%*!<%W%s%=!<%9(B | |
328 $B%W%m%8%'%/%H$,%3%_%C%H8"$N$J$$%f!<%6$K$bF?L>$NFI$_=P$7@lMQ%"%/%;%9$rDs6!(B | |
329 $B$9$k$h$&$K$J$k$H!$%D!<%k$OH`$i$N9T$C$?JQ99$r5-O?$G$-$J$$$?$a!$%W%m%8%'%/(B | |
330 $B%H$H$d$j$H$j$r9T$&<+A3$J<jCJ$H$O8@$($J$$$3$H$,$o$+$C$?!%(B | |
331 | |
332 %The current generation of revision control tools is peer-to-peer in | |
333 %nature. All of these systems have dropped the dependency on a single | |
334 %central server, and allow people to distribute their revision control | |
335 %data to where it's actually needed. Collaboration over the Internet | |
336 %has moved from constrained by technology to a matter of choice and | |
337 %consensus. Modern tools can operate offline indefinitely and | |
338 %autonomously, with a network connection only needed when syncing | |
339 %changes with another repository. | |
340 | |
341 $B8=9T@$Be$N%j%S%8%g%s%3%s%H%m!<%k%D!<%k$O!$%T%"%D!<%T%"$G$"$k!%$3$l$i$N%7(B | |
342 $B%9%F%`$NA4$F$,C10l$NCf1{%5!<%P$X0MB8$7$J$/$J$C$F$*$j!$%j%S%8%g%s%3%s%H%m!<(B | |
343 $B%k%G!<%?$rI,MW$J$H$3$m$XJ,;6$5$;$k$3$H$,$G$-$k$h$&$K$J$C$F$$$k!%%$%s%?!<(B | |
344 $B%M%C%H$rDL$8$?6&F1:n6H$O5;=QE*@)Ls$+$iN%$l$F!$A*Br$H9g0U$K$h$C$F9T$o$l$k(B | |
345 $B$h$&$K$J$C$?!%8=Be$N%D!<%k$O%*%U%i%$%s$N$^$^$G$b!$<+N'E*$K$bF0:n$9$k$h$&(B | |
346 $B$K$J$C$F$$$k!%%M%C%H%o!<%/@\B3$OJQ99$rJL$N%j%]%8%H%j$HF14|$5$;$k;~$K$N$_(B | |
347 $BI,MW$G$"$k!%(B | |
219
15a6fd2ba582
Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
218
diff
changeset
|
348 |
386 | 349 %\section{A few of the advantages of distributed revision control} |
350 \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
|
351 |
219
15a6fd2ba582
Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
218
diff
changeset
|
352 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
|
353 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
|
354 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
|
355 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
|
356 shine relative to centralised ones. |
15a6fd2ba582
Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
218
diff
changeset
|
357 |
15a6fd2ba582
Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
218
diff
changeset
|
358 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
|
359 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
|
360 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
|
361 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
|
362 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
|
363 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
|
364 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
|
365 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
|
366 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
|
367 |
219
15a6fd2ba582
Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
218
diff
changeset
|
368 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
|
369 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
|
370 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
|
371 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
|
372 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
|
373 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
|
374 |
219
15a6fd2ba582
Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
218
diff
changeset
|
375 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
|
376 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
|
377 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
|
378 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
|
379 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
|
380 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
|
381 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
|
382 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
|
383 |
386 | 384 %\subsection{Advantages for open source projects} |
385 \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
|
386 |
219
15a6fd2ba582
Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
218
diff
changeset
|
387 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
|
388 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
|
389 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
|
390 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
|
391 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
|
392 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
|
393 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
|
394 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
|
395 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
|
396 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
|
397 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
|
398 of the repository. |
155
914babdc99c8
run-example: better error if bogus section name found.
Bryan O'Sullivan <bos@serpentine.com>
parents:
16
diff
changeset
|
399 |
386 | 400 %\subsubsection{The forking non-problem} |
401 \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
|
402 |
0ca9045035f7
Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
219
diff
changeset
|
403 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
|
404 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
|
405 ``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
|
406 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
|
407 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
|
408 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
|
409 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
|
410 |
0ca9045035f7
Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
219
diff
changeset
|
411 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
|
412 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
|
413 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
|
414 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
|
415 ``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
|
416 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
|
417 |
220
0ca9045035f7
Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
219
diff
changeset
|
418 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
|
419 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
|
420 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
|
421 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
|
422 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
|
423 fundamental: they happen all the time. |
0ca9045035f7
Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
219
diff
changeset
|
424 |
0ca9045035f7
Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
219
diff
changeset
|
425 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
|
426 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
|
427 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
|
428 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
|
429 \begin{itemize} |
0ca9045035f7
Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
219
diff
changeset
|
430 \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
|
431 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
|
432 outsiders (people without). |
0ca9045035f7
Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
219
diff
changeset
|
433 \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
|
434 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
|
435 software is just another merge. |
0ca9045035f7
Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
219
diff
changeset
|
436 \end{itemize} |
155
914babdc99c8
run-example: better error if bogus section name found.
Bryan O'Sullivan <bos@serpentine.com>
parents:
16
diff
changeset
|
437 |
220
0ca9045035f7
Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
219
diff
changeset
|
438 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
|
439 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
|
440 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
|
441 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
|
442 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
|
443 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
|
444 control. So while your control in this case is illusory, you are |
263 | 445 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
|
446 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
|
447 |
386 | 448 %\subsection{Advantages for commercial projects} |
449 \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
|
450 |
220
0ca9045035f7
Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
219
diff
changeset
|
451 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
|
452 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
|
453 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
|
454 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
|
455 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
|
456 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
|
457 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
|
458 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
|
459 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
|
460 long-haul network links. |
0ca9045035f7
Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
219
diff
changeset
|
461 |
0ca9045035f7
Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
219
diff
changeset
|
462 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
|
463 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
|
464 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
|
465 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
|
466 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
|
467 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
|
468 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
|
469 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
|
470 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
|
471 |
0ca9045035f7
Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
219
diff
changeset
|
472 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
|
473 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
|
474 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
|
475 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
|
476 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
|
477 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
|
478 |
386 | 479 %\section{Why choose Mercurial?} |
480 \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
|
481 |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
482 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
|
483 good choice as a revision control system. |
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
484 \begin{itemize} |
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
485 \item It is easy to learn and use. |
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
486 \item It is lightweight. |
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
487 \item It scales excellently. |
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
488 \item It is easy to customise. |
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
489 \end{itemize} |
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
490 |
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
491 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
|
492 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
|
493 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
|
494 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
|
495 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
|
496 of a host of exceptions. |
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
497 |
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
498 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
|
499 Creating new changes and branches; transferring changes around |
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
500 (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
|
501 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
|
502 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
|
503 operations. |
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
504 |
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
505 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
|
506 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
|
507 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
|
508 source code. |
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
509 |
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
510 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
|
511 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
|
512 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
|
513 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
|
514 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
|
515 bugs to improving performance. |
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
516 |
386 | 517 %\section{Mercurial compared with other tools} |
518 \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
|
519 |
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
520 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
|
521 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
|
522 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
|
523 most cases for several years at a time. |
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
524 |
280
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
525 |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
526 \subsection{Subversion} |
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
527 |
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
528 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
|
529 CVS. It has a centralised client/server architecture. |
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
530 |
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
531 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
|
532 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
|
533 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
|
534 operating systems. |
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
535 |
256
649a93bb45ae
Fiddle with the sections on SVN and CVS.
Bryan O'Sullivan <bos@serpentine.com>
parents:
221
diff
changeset
|
536 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
|
537 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
|
538 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
|
539 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
|
540 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
|
541 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
|
542 weakness. |
256
649a93bb45ae
Fiddle with the sections on SVN and CVS.
Bryan O'Sullivan <bos@serpentine.com>
parents:
221
diff
changeset
|
543 |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
544 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
|
545 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
|
546 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
|
547 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
|
548 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
|
549 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
|
550 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
|
551 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
|
552 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
|
553 large projects. |
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
554 |
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
555 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
|
556 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
|
557 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
|
558 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
|
559 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
|
560 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
|
561 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
|
562 |
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
563 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
|
564 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
|
565 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
|
566 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
|
567 user manual. |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
568 |
280
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
569 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
|
570 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
|
571 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
|
572 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
|
573 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
|
574 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
|
575 are large. |
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 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
|
578 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
|
579 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
|
580 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
|
581 project where binary files are widely used. |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
582 |
280
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
583 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
|
584 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
|
585 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
|
586 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
|
587 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
|
588 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
|
589 |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
590 |
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
591 \subsection{Git} |
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 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
|
594 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
|
595 design was somewhat influenced by Monotone. |
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
596 |
280
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
597 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
|
598 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
|
599 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
|
600 simplicity. |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
601 |
280
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
602 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
|
603 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
|
604 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
|
605 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
|
606 far behind that of Mercurial. |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
607 |
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
608 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
|
609 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
|
610 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
|
611 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
|
612 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
|
613 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
|
614 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
|
615 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
|
616 magnitude larger. |
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
617 |
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
618 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
|
619 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
|
620 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
|
621 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
|
622 |
280
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
623 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
|
624 |
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
625 |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
626 \subsection{CVS} |
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
627 |
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
628 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
|
629 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
|
630 lightly maintained for many years. |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
631 |
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
632 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
|
633 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
|
634 ``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
|
635 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
|
636 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
|
637 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
|
638 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
|
639 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
|
640 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
|
641 |
649a93bb45ae
Fiddle with the sections on SVN and CVS.
Bryan O'Sullivan <bos@serpentine.com>
parents:
221
diff
changeset
|
642 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
|
643 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
|
644 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
|
645 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
|
646 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
|
647 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
|
648 |
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
649 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
|
650 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
|
651 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
|
652 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
|
653 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
|
654 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
|
655 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
|
656 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
|
657 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
|
658 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
|
659 problems I can recall from personal experience). |
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
660 |
280
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
661 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
|
662 |
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
663 |
386 | 664 %\subsection{Commercial tools} |
665 \subsection{$B>&MQ%D!<%k(B} | |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
666 |
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
667 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
|
668 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
|
669 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
|
670 server about every file they intend to edit. |
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
671 |
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
672 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
|
673 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
|
674 Modestly large Perforce installations require the deployment of |
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
675 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
|
676 |
280
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
677 |
386 | 678 %\subsection{Choosing a revision control tool} |
679 \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
|
680 |
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
681 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
|
682 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
|
683 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
|
684 |
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
685 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
|
686 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
|
687 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
|
688 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
|
689 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
|
690 overlapping development. |
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
691 |
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
692 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
|
693 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
|
694 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
|
695 |
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
696 |
386 | 697 %\section{Switching from another tool to Mercurial} |
698 \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
|
699 |
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
700 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
|
701 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
|
702 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
|
703 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
|
704 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
|
705 |
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
706 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
|
707 follows: |
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
708 \begin{itemize} |
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
709 \item Subversion |
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
710 \item CVS |
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
711 \item Git |
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
712 \item Darcs |
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
713 \end{itemize} |
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
714 |
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
715 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
|
716 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
|
717 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
|
718 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
|
719 |
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
720 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
|
721 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
|
722 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
|
723 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
|
724 changes. |
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
725 |
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
726 |
386 | 727 %%% Local Variables: |
293
3b1291f24c0d
- replaved latex-mode to yatex-mode
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
728 %%% mode: yatex |
16
81454425eee9
Progress on a few fronts, mainly indexing and MQ chapter content
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
729 %%% TeX-master: "00book" |
386 | 730 %%% End: |