Mercurial > hgbook
annotate en/ch01-intro.xml @ 660:21c62e09b99f
Typo and spelling corrections. Removed tex tags.
author | Ori Avtalion <ori@avtalion.name> |
---|---|
date | Thu, 05 Mar 2009 21:52:23 +0200 |
parents | 8631da51309b |
children | 13513d2a128d |
rev | line source |
---|---|
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
1 <!-- vim: set filetype=docbkxml shiftwidth=2 autoindent expandtab tw=77 : --> |
217
369858a4d63c
Start to flesh out chapter 1.
Bryan O'Sullivan <bos@serpentine.com>
parents:
155
diff
changeset
|
2 |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
3 <chapter id="chap:intro"> |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
4 <title>Introduction</title> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
5 |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
6 <sect1> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
7 <title>About revision control</title> |
217
369858a4d63c
Start to flesh out chapter 1.
Bryan O'Sullivan <bos@serpentine.com>
parents:
155
diff
changeset
|
8 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
9 <para>Revision control is the process of managing multiple |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
10 versions of a piece of information. In its simplest form, this |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
11 is something that many people do by hand: every time you modify |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
12 a file, save it under a new name that contains a number, each |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
13 one higher than the number of the preceding version.</para> |
217
369858a4d63c
Start to flesh out chapter 1.
Bryan O'Sullivan <bos@serpentine.com>
parents:
155
diff
changeset
|
14 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
15 <para>Manually managing multiple versions of even a single file is |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
16 an error-prone task, though, so software tools to help automate |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
17 this process have long been available. The earliest automated |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
18 revision control tools were intended to help a single user to |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
19 manage revisions of a single file. Over the past few decades, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
20 the scope of revision control tools has expanded greatly; they |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
21 now manage multiple files, and help multiple people to work |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
22 together. The best modern revision control tools have no |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
23 problem coping with thousands of people working together on |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
24 projects that consist of hundreds of thousands of files.</para> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
25 |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
26 <sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
27 <title>Why use revision control?</title> |
155
914babdc99c8
run-example: better error if bogus section name found.
Bryan O'Sullivan <bos@serpentine.com>
parents:
16
diff
changeset
|
28 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
29 <para>There are a number of reasons why you or your team might |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
30 want to use an automated revision control tool for a |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
31 project.</para> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
32 <itemizedlist> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
33 <listitem><para>It will track the history and evolution of |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
34 your project, so you don't have to. For every change, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
35 you'll have a log of <emphasis>who</emphasis> made it; |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
36 <emphasis>why</emphasis> they made it; |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
37 <emphasis>when</emphasis> they made it; and |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
38 <emphasis>what</emphasis> the change |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
39 was.</para></listitem> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
40 <listitem><para>When you're working with other people, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
41 revision control software makes it easier for you to |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
42 collaborate. For example, when people more or less |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
43 simultaneously make potentially incompatible changes, the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
44 software will help you to identify and resolve those |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
45 conflicts.</para></listitem> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
46 <listitem><para>It can help you to recover from mistakes. If |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
47 you make a change that later turns out to be in error, you |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
48 can revert to an earlier version of one or more files. In |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
49 fact, a <emphasis>really</emphasis> good revision control |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
50 tool will even help you to efficiently figure out exactly |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
51 when a problem was introduced (see section <xref |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
52 linkend="sec:undo:bisect"/> for details).</para></listitem> |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
53 <listitem><para>It will help you to work simultaneously on, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
54 and manage the drift between, multiple versions of your |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
55 project.</para></listitem></itemizedlist> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
56 <para>Most of these reasons are equally valid---at least in |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
57 theory---whether you're working on a project by yourself, or |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
58 with a hundred other people.</para> |
218
75fd236d736b
History of SCM tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
217
diff
changeset
|
59 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
60 <para>A key question about the practicality of revision control |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
61 at these two different scales (<quote>lone hacker</quote> and |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
62 <quote>huge team</quote>) is how its |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
63 <emphasis>benefits</emphasis> compare to its |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
64 <emphasis>costs</emphasis>. A revision control tool that's |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
65 difficult to understand or use is going to impose a high |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
66 cost.</para> |
218
75fd236d736b
History of SCM tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
217
diff
changeset
|
67 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
68 <para>A five-hundred-person project is likely to collapse under |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
69 its own weight almost immediately without a revision control |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
70 tool and process. In this case, the cost of using revision |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
71 control might hardly seem worth considering, since |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
72 <emphasis>without</emphasis> it, failure is almost |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
73 guaranteed.</para> |
218
75fd236d736b
History of SCM tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
217
diff
changeset
|
74 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
75 <para>On the other hand, a one-person <quote>quick hack</quote> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
76 might seem like a poor place to use a revision control tool, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
77 because surely the cost of using one must be close to the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
78 overall cost of the project. Right?</para> |
217
369858a4d63c
Start to flesh out chapter 1.
Bryan O'Sullivan <bos@serpentine.com>
parents:
155
diff
changeset
|
79 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
80 <para>Mercurial uniquely supports <emphasis>both</emphasis> of |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
81 these scales of development. You can learn the basics in just |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
82 a few minutes, and due to its low overhead, you can apply |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
83 revision control to the smallest of projects with ease. Its |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
84 simplicity means you won't have a lot of abstruse concepts or |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
85 command sequences competing for mental space with whatever |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
86 you're <emphasis>really</emphasis> trying to do. At the same |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
87 time, Mercurial's high performance and peer-to-peer nature let |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
88 you scale painlessly to handle large projects.</para> |
219
15a6fd2ba582
Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
218
diff
changeset
|
89 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
90 <para>No revision control tool can rescue a poorly run project, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
91 but a good choice of tools can make a huge difference to the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
92 fluidity with which you can work on a project.</para> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
93 |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
94 </sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
95 <sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
96 <title>The many names of revision control</title> |
217
369858a4d63c
Start to flesh out chapter 1.
Bryan O'Sullivan <bos@serpentine.com>
parents:
155
diff
changeset
|
97 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
98 <para>Revision control is a diverse field, so much so that it |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
99 doesn't actually have a single name or acronym. Here are a |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
100 few of the more common names and acronyms you'll |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
101 encounter:</para> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
102 <itemizedlist> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
103 <listitem><para>Revision control (RCS)</para></listitem> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
104 <listitem><para>Software configuration management (SCM), or |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
105 configuration management</para></listitem> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
106 <listitem><para>Source code management</para></listitem> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
107 <listitem><para>Source code control, or source |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
108 control</para></listitem> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
109 <listitem><para>Version control |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
110 (VCS)</para></listitem></itemizedlist> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
111 <para>Some people claim that these terms actually have different |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
112 meanings, but in practice they overlap so much that there's no |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
113 agreed or even useful way to tease them apart.</para> |
155
914babdc99c8
run-example: better error if bogus section name found.
Bryan O'Sullivan <bos@serpentine.com>
parents:
16
diff
changeset
|
114 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
115 </sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
116 </sect1> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
117 <sect1> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
118 <title>A short history of revision control</title> |
218
75fd236d736b
History of SCM tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
217
diff
changeset
|
119 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
120 <para>The best known of the old-time revision control tools is |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
121 SCCS (Source Code Control System), which Marc Rochkind wrote at |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
122 Bell Labs, in the early 1970s. SCCS operated on individual |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
123 files, and required every person working on a project to have |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
124 access to a shared workspace on a single system. Only one |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
125 person could modify a file at any time; arbitration for access |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
126 to files was via locks. It was common for people to lock files, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
127 and later forget to unlock them, preventing anyone else from |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
128 modifying those files without the help of an |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
129 administrator.</para> |
218
75fd236d736b
History of SCM tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
217
diff
changeset
|
130 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
131 <para>Walter Tichy developed a free alternative to SCCS in the |
660
21c62e09b99f
Typo and spelling corrections. Removed tex tags.
Ori Avtalion <ori@avtalion.name>
parents:
657
diff
changeset
|
132 early 1980s; he called his program RCS (Revision Control System). |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
133 Like SCCS, RCS required developers to work in a single shared |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
134 workspace, and to lock files to prevent multiple people from |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
135 modifying them simultaneously.</para> |
218
75fd236d736b
History of SCM tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
217
diff
changeset
|
136 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
137 <para>Later in the 1980s, Dick Grune used RCS as a building block |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
138 for a set of shell scripts he initially called cmt, but then |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
139 renamed to CVS (Concurrent Versions System). The big innovation |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
140 of CVS was that it let developers work simultaneously and |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
141 somewhat independently in their own personal workspaces. The |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
142 personal workspaces prevented developers from stepping on each |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
143 other's toes all the time, as was common with SCCS and RCS. Each |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
144 developer had a copy of every project file, and could modify |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
145 their copies independently. They had to merge their edits prior |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
146 to committing changes to the central repository.</para> |
155
914babdc99c8
run-example: better error if bogus section name found.
Bryan O'Sullivan <bos@serpentine.com>
parents:
16
diff
changeset
|
147 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
148 <para>Brian Berliner took Grune's original scripts and rewrote |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
149 them in C, releasing in 1989 the code that has since developed |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
150 into the modern version of CVS. CVS subsequently acquired the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
151 ability to operate over a network connection, giving it a |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
152 client/server architecture. CVS's architecture is centralised; |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
153 only the server has a copy of the history of the project. Client |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
154 workspaces just contain copies of recent versions of the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
155 project's files, and a little metadata to tell them where the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
156 server is. CVS has been enormously successful; it is probably |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
157 the world's most widely used revision control system.</para> |
218
75fd236d736b
History of SCM tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
217
diff
changeset
|
158 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
159 <para>In the early 1990s, Sun Microsystems developed an early |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
160 distributed revision control system, called TeamWare. A |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
161 TeamWare workspace contains a complete copy of the project's |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
162 history. TeamWare has no notion of a central repository. (CVS |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
163 relied upon RCS for its history storage; TeamWare used |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
164 SCCS.)</para> |
218
75fd236d736b
History of SCM tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
217
diff
changeset
|
165 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
166 <para>As the 1990s progressed, awareness grew of a number of |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
167 problems with CVS. It records simultaneous changes to multiple |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
168 files individually, instead of grouping them together as a |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
169 single logically atomic operation. It does not manage its file |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
170 hierarchy well; it is easy to make a mess of a repository by |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
171 renaming files and directories. Worse, its source code is |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
172 difficult to read and maintain, which made the <quote>pain |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
173 level</quote> of fixing these architectural problems |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
174 prohibitive.</para> |
218
75fd236d736b
History of SCM tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
217
diff
changeset
|
175 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
176 <para>In 2001, Jim Blandy and Karl Fogel, two developers who had |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
177 worked on CVS, started a project to replace it with a tool that |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
178 would have a better architecture and cleaner code. The result, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
179 Subversion, does not stray from CVS's centralised client/server |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
180 model, but it adds multi-file atomic commits, better namespace |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
181 management, and a number of other features that make it a |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
182 generally better tool than CVS. Since its initial release, it |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
183 has rapidly grown in popularity.</para> |
218
75fd236d736b
History of SCM tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
217
diff
changeset
|
184 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
185 <para>More or less simultaneously, Graydon Hoare began working on |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
186 an ambitious distributed revision control system that he named |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
187 Monotone. While Monotone addresses many of CVS's design flaws |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
188 and has a peer-to-peer architecture, it goes beyond earlier (and |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
189 subsequent) revision control tools in a number of innovative |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
190 ways. It uses cryptographic hashes as identifiers, and has an |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
191 integral notion of <quote>trust</quote> for code from different |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
192 sources.</para> |
218
75fd236d736b
History of SCM tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
217
diff
changeset
|
193 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
194 <para>Mercurial began life in 2005. While a few aspects of its |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
195 design are influenced by Monotone, Mercurial focuses on ease of |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
196 use, high performance, and scalability to very large |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
197 projects.</para> |
155
914babdc99c8
run-example: better error if bogus section name found.
Bryan O'Sullivan <bos@serpentine.com>
parents:
16
diff
changeset
|
198 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
199 </sect1> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
200 <sect1> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
201 <title>Trends in revision control</title> |
219
15a6fd2ba582
Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
218
diff
changeset
|
202 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
203 <para>There has been an unmistakable trend in the development and |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
204 use of revision control tools over the past four decades, as |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
205 people have become familiar with the capabilities of their tools |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
206 and constrained by their limitations.</para> |
219
15a6fd2ba582
Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
218
diff
changeset
|
207 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
208 <para>The first generation began by managing single files on |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
209 individual computers. Although these tools represented a huge |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
210 advance over ad-hoc manual revision control, their locking model |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
211 and reliance on a single computer limited them to small, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
212 tightly-knit teams.</para> |
155
914babdc99c8
run-example: better error if bogus section name found.
Bryan O'Sullivan <bos@serpentine.com>
parents:
16
diff
changeset
|
213 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
214 <para>The second generation loosened these constraints by moving |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
215 to network-centered architectures, and managing entire projects |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
216 at a time. As projects grew larger, they ran into new problems. |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
217 With clients needing to talk to servers very frequently, server |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
218 scaling became an issue for large projects. An unreliable |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
219 network connection could prevent remote users from being able to |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
220 talk to the server at all. As open source projects started |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
221 making read-only access available anonymously to anyone, people |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
222 without commit privileges found that they could not use the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
223 tools to interact with a project in a natural way, as they could |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
224 not record their changes.</para> |
219
15a6fd2ba582
Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
218
diff
changeset
|
225 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
226 <para>The current generation of revision control tools is |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
227 peer-to-peer in nature. All of these systems have dropped the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
228 dependency on a single central server, and allow people to |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
229 distribute their revision control data to where it's actually |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
230 needed. Collaboration over the Internet has moved from |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
231 constrained by technology to a matter of choice and consensus. |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
232 Modern tools can operate offline indefinitely and autonomously, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
233 with a network connection only needed when syncing changes with |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
234 another repository.</para> |
155
914babdc99c8
run-example: better error if bogus section name found.
Bryan O'Sullivan <bos@serpentine.com>
parents:
16
diff
changeset
|
235 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
236 </sect1> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
237 <sect1> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
238 <title>A few of the advantages of distributed revision |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
239 control</title> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
240 |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
241 <para>Even though distributed revision control tools have for |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
242 several years been as robust and usable as their |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
243 previous-generation counterparts, people using older tools have |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
244 not yet necessarily woken up to their advantages. There are a |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
245 number of ways in which distributed tools shine relative to |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
246 centralised ones.</para> |
219
15a6fd2ba582
Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
218
diff
changeset
|
247 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
248 <para>For an individual developer, distributed tools are almost |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
249 always much faster than centralised tools. This is for a simple |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
250 reason: a centralised tool needs to talk over the network for |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
251 many common operations, because most metadata is stored in a |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
252 single copy on the central server. A distributed tool stores |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
253 all of its metadata locally. All else being equal, talking over |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
254 the network adds overhead to a centralised tool. Don't |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
255 underestimate the value of a snappy, responsive tool: you're |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
256 going to spend a lot of time interacting with your revision |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
257 control software.</para> |
155
914babdc99c8
run-example: better error if bogus section name found.
Bryan O'Sullivan <bos@serpentine.com>
parents:
16
diff
changeset
|
258 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
259 <para>Distributed tools are indifferent to the vagaries of your |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
260 server infrastructure, again because they replicate metadata to |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
261 so many locations. If you use a centralised system and your |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
262 server catches fire, you'd better hope that your backup media |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
263 are reliable, and that your last backup was recent and actually |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
264 worked. With a distributed tool, you have many backups |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
265 available on every contributor's computer.</para> |
155
914babdc99c8
run-example: better error if bogus section name found.
Bryan O'Sullivan <bos@serpentine.com>
parents:
16
diff
changeset
|
266 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
267 <para>The reliability of your network will affect distributed |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
268 tools far less than it will centralised tools. You can't even |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
269 use a centralised tool without a network connection, except for |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
270 a few highly constrained commands. With a distributed tool, if |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
271 your network connection goes down while you're working, you may |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
272 not even notice. The only thing you won't be able to do is talk |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
273 to repositories on other computers, something that is relatively |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
274 rare compared with local operations. If you have a far-flung |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
275 team of collaborators, this may be significant.</para> |
219
15a6fd2ba582
Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
218
diff
changeset
|
276 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
277 <sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
278 <title>Advantages for open source projects</title> |
220
0ca9045035f7
Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
219
diff
changeset
|
279 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
280 <para>If you take a shine to an open source project and decide |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
281 that you would like to start hacking on it, and that project |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
282 uses a distributed revision control tool, you are at once a |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
283 peer with the people who consider themselves the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
284 <quote>core</quote> of that project. If they publish their |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
285 repositories, you can immediately copy their project history, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
286 start making changes, and record your work, using the same |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
287 tools in the same ways as insiders. By contrast, with a |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
288 centralised tool, you must use the software in a <quote>read |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
289 only</quote> mode unless someone grants you permission to |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
290 commit changes to their central server. Until then, you won't |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
291 be able to record changes, and your local modifications will |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
292 be at risk of corruption any time you try to update your |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
293 client's view of the repository.</para> |
155
914babdc99c8
run-example: better error if bogus section name found.
Bryan O'Sullivan <bos@serpentine.com>
parents:
16
diff
changeset
|
294 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
295 <sect3> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
296 <title>The forking non-problem</title> |
220
0ca9045035f7
Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
219
diff
changeset
|
297 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
298 <para>It has been suggested that distributed revision control |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
299 tools pose some sort of risk to open source projects because |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
300 they make it easy to <quote>fork</quote> the development of |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
301 a project. A fork happens when there are differences in |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
302 opinion or attitude between groups of developers that cause |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
303 them to decide that they can't work together any longer. |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
304 Each side takes a more or less complete copy of the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
305 project's source code, and goes off in its own |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
306 direction.</para> |
220
0ca9045035f7
Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
219
diff
changeset
|
307 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
308 <para>Sometimes the camps in a fork decide to reconcile their |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
309 differences. With a centralised revision control system, the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
310 <emphasis>technical</emphasis> process of reconciliation is |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
311 painful, and has to be performed largely by hand. You have |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
312 to decide whose revision history is going to |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
313 <quote>win</quote>, and graft the other team's changes into |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
314 the tree somehow. This usually loses some or all of one |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
315 side's revision history.</para> |
155
914babdc99c8
run-example: better error if bogus section name found.
Bryan O'Sullivan <bos@serpentine.com>
parents:
16
diff
changeset
|
316 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
317 <para>What distributed tools do with respect to forking is |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
318 they make forking the <emphasis>only</emphasis> way to |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
319 develop a project. Every single change that you make is |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
320 potentially a fork point. The great strength of this |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
321 approach is that a distributed revision control tool has to |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
322 be really good at <emphasis>merging</emphasis> forks, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
323 because forks are absolutely fundamental: they happen all |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
324 the time.</para> |
220
0ca9045035f7
Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
219
diff
changeset
|
325 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
326 <para>If every piece of work that everybody does, all the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
327 time, is framed in terms of forking and merging, then what |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
328 the open source world refers to as a <quote>fork</quote> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
329 becomes <emphasis>purely</emphasis> a social issue. If |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
330 anything, distributed tools <emphasis>lower</emphasis> the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
331 likelihood of a fork:</para> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
332 <itemizedlist> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
333 <listitem><para>They eliminate the social distinction that |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
334 centralised tools impose: that between insiders (people |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
335 with commit access) and outsiders (people |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
336 without).</para></listitem> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
337 <listitem><para>They make it easier to reconcile after a |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
338 social fork, because all that's involved from the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
339 perspective of the revision control software is just |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
340 another merge.</para></listitem></itemizedlist> |
155
914babdc99c8
run-example: better error if bogus section name found.
Bryan O'Sullivan <bos@serpentine.com>
parents:
16
diff
changeset
|
341 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
342 <para>Some people resist distributed tools because they want |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
343 to retain tight control over their projects, and they |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
344 believe that centralised tools give them this control. |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
345 However, if you're of this belief, and you publish your CVS |
660
21c62e09b99f
Typo and spelling corrections. Removed tex tags.
Ori Avtalion <ori@avtalion.name>
parents:
657
diff
changeset
|
346 or Subversion repositories publicly, there are plenty of |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
347 tools available that can pull out your entire project's |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
348 history (albeit slowly) and recreate it somewhere that you |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
349 don't control. So while your control in this case is |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
350 illusory, you are forgoing the ability to fluidly |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
351 collaborate with whatever people feel compelled to mirror |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
352 and fork your history.</para> |
220
0ca9045035f7
Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
219
diff
changeset
|
353 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
354 </sect3> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
355 </sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
356 <sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
357 <title>Advantages for commercial projects</title> |
155
914babdc99c8
run-example: better error if bogus section name found.
Bryan O'Sullivan <bos@serpentine.com>
parents:
16
diff
changeset
|
358 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
359 <para>Many commercial projects are undertaken by teams that are |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
360 scattered across the globe. Contributors who are far from a |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
361 central server will see slower command execution and perhaps |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
362 less reliability. Commercial revision control systems attempt |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
363 to ameliorate these problems with remote-site replication |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
364 add-ons that are typically expensive to buy and cantankerous |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
365 to administer. A distributed system doesn't suffer from these |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
366 problems in the first place. Better yet, you can easily set |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
367 up multiple authoritative servers, say one per site, so that |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
368 there's no redundant communication between repositories over |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
369 expensive long-haul network links.</para> |
220
0ca9045035f7
Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
219
diff
changeset
|
370 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
371 <para>Centralised revision control systems tend to have |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
372 relatively low scalability. It's not unusual for an expensive |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
373 centralised system to fall over under the combined load of |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
374 just a few dozen concurrent users. Once again, the typical |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
375 response tends to be an expensive and clunky replication |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
376 facility. Since the load on a central server---if you have |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
377 one at all---is many times lower with a distributed tool |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
378 (because all of the data is replicated everywhere), a single |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
379 cheap server can handle the needs of a much larger team, and |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
380 replication to balance load becomes a simple matter of |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
381 scripting.</para> |
220
0ca9045035f7
Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
219
diff
changeset
|
382 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
383 <para>If you have an employee in the field, troubleshooting a |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
384 problem at a customer's site, they'll benefit from distributed |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
385 revision control. The tool will let them generate custom |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
386 builds, try different fixes in isolation from each other, and |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
387 search efficiently through history for the sources of bugs and |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
388 regressions in the customer's environment, all without needing |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
389 to connect to your company's network.</para> |
219
15a6fd2ba582
Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
218
diff
changeset
|
390 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
391 </sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
392 </sect1> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
393 <sect1> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
394 <title>Why choose Mercurial?</title> |
155
914babdc99c8
run-example: better error if bogus section name found.
Bryan O'Sullivan <bos@serpentine.com>
parents:
16
diff
changeset
|
395 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
396 <para>Mercurial has a unique set of properties that make it a |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
397 particularly good choice as a revision control system.</para> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
398 <itemizedlist> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
399 <listitem><para>It is easy to learn and use.</para></listitem> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
400 <listitem><para>It is lightweight.</para></listitem> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
401 <listitem><para>It scales excellently.</para></listitem> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
402 <listitem><para>It is easy to |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
403 customise.</para></listitem></itemizedlist> |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
404 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
405 <para>If you are at all familiar with revision control systems, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
406 you should be able to get up and running with Mercurial in less |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
407 than five minutes. Even if not, it will take no more than a few |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
408 minutes longer. Mercurial's command and feature sets are |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
409 generally uniform and consistent, so you can keep track of a few |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
410 general rules instead of a host of exceptions.</para> |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
411 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
412 <para>On a small project, you can start working with Mercurial in |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
413 moments. Creating new changes and branches; transferring changes |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
414 around (whether locally or over a network); and history and |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
415 status operations are all fast. Mercurial attempts to stay |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
416 nimble and largely out of your way by combining low cognitive |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
417 overhead with blazingly fast operations.</para> |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
418 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
419 <para>The usefulness of Mercurial is not limited to small |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
420 projects: it is used by projects with hundreds to thousands of |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
421 contributors, each containing tens of thousands of files and |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
422 hundreds of megabytes of source code.</para> |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
423 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
424 <para>If the core functionality of Mercurial is not enough for |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
425 you, it's easy to build on. Mercurial is well suited to |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
426 scripting tasks, and its clean internals and implementation in |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
427 Python make it easy to add features in the form of extensions. |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
428 There are a number of popular and useful extensions already |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
429 available, ranging from helping to identify bugs to improving |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
430 performance.</para> |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
431 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
432 </sect1> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
433 <sect1> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
434 <title>Mercurial compared with other tools</title> |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
435 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
436 <para>Before you read on, please understand that this section |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
437 necessarily reflects my own experiences, interests, and (dare I |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
438 say it) biases. I have used every one of the revision control |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
439 tools listed below, in most cases for several years at a |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
440 time.</para> |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
441 |
280
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
442 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
443 <sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
444 <title>Subversion</title> |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
445 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
446 <para>Subversion is a popular revision control tool, developed |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
447 to replace CVS. It has a centralised client/server |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
448 architecture.</para> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
449 |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
450 <para>Subversion and Mercurial have similarly named commands for |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
451 performing the same operations, so if you're familiar with |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
452 one, it is easy to learn to use the other. Both tools are |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
453 portable to all popular operating systems.</para> |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
454 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
455 <para>Prior to version 1.5, Subversion had no useful support for |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
456 merges. At the time of writing, its merge tracking capability |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
457 is new, and known to be <ulink |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
458 url="http://svnbook.red-bean.com/nightly/en/svn.branchmerge.advanced.html#svn.branchmerge.advanced.finalword">complicated |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
459 and buggy</ulink>.</para> |
256
649a93bb45ae
Fiddle with the sections on SVN and CVS.
Bryan O'Sullivan <bos@serpentine.com>
parents:
221
diff
changeset
|
460 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
461 <para>Mercurial has a substantial performance advantage over |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
462 Subversion on every revision control operation I have |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
463 benchmarked. I have measured its advantage as ranging from a |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
464 factor of two to a factor of six when compared with Subversion |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
465 1.4.3's <emphasis>ra_local</emphasis> file store, which is the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
466 fastest access method available. In more realistic |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
467 deployments involving a network-based store, Subversion will |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
468 be at a substantially larger disadvantage. Because many |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
469 Subversion commands must talk to the server and Subversion |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
470 does not have useful replication facilities, server capacity |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
471 and network bandwidth become bottlenecks for modestly large |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
472 projects.</para> |
280
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
473 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
474 <para>Additionally, Subversion incurs substantial storage |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
475 overhead to avoid network transactions for a few common |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
476 operations, such as finding modified files |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
477 (<literal>status</literal>) and displaying modifications |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
478 against the current revision (<literal>diff</literal>). As a |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
479 result, a Subversion working copy is often the same size as, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
480 or larger than, a Mercurial repository and working directory, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
481 even though the Mercurial repository contains a complete |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
482 history of the project.</para> |
280
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
483 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
484 <para>Subversion is widely supported by third party tools. |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
485 Mercurial currently lags considerably in this area. This gap |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
486 is closing, however, and indeed some of Mercurial's GUI tools |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
487 now outshine their Subversion equivalents. Like Mercurial, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
488 Subversion has an excellent user manual.</para> |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
489 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
490 <para>Because Subversion doesn't store revision history on the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
491 client, it is well suited to managing projects that deal with |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
492 lots of large, opaque binary files. If you check in fifty |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
493 revisions to an incompressible 10MB file, Subversion's |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
494 client-side space usage stays constant The space used by any |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
495 distributed SCM will grow rapidly in proportion to the number |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
496 of revisions, because the differences between each revision |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
497 are large.</para> |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
498 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
499 <para>In addition, it's often difficult or, more usually, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
500 impossible to merge different versions of a binary file. |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
501 Subversion's ability to let a user lock a file, so that they |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
502 temporarily have the exclusive right to commit changes to it, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
503 can be a significant advantage to a project where binary files |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
504 are widely used.</para> |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
505 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
506 <para>Mercurial can import revision history from a Subversion |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
507 repository. It can also export revision history to a |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
508 Subversion repository. This makes it easy to <quote>test the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
509 waters</quote> and use Mercurial and Subversion in parallel |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
510 before deciding to switch. History conversion is incremental, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
511 so you can perform an initial conversion, then small |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
512 additional conversions afterwards to bring in new |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
513 changes.</para> |
280
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
514 |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
515 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
516 </sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
517 <sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
518 <title>Git</title> |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
519 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
520 <para>Git is a distributed revision control tool that was |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
521 developed for managing the Linux kernel source tree. Like |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
522 Mercurial, its early design was somewhat influenced by |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
523 Monotone.</para> |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
524 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
525 <para>Git has a very large command set, with version 1.5.0 |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
526 providing 139 individual commands. It has something of a |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
527 reputation for being difficult to learn. Compared to Git, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
528 Mercurial has a strong focus on simplicity.</para> |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
529 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
530 <para>In terms of performance, Git is extremely fast. In |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
531 several cases, it is faster than Mercurial, at least on Linux, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
532 while Mercurial performs better on other operations. However, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
533 on Windows, the performance and general level of support that |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
534 Git provides is, at the time of writing, far behind that of |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
535 Mercurial.</para> |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
536 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
537 <para>While a Mercurial repository needs no maintenance, a Git |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
538 repository requires frequent manual <quote>repacks</quote> of |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
539 its metadata. Without these, performance degrades, while |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
540 space usage grows rapidly. A server that contains many Git |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
541 repositories that are not rigorously and frequently repacked |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
542 will become heavily disk-bound during backups, and there have |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
543 been instances of daily backups taking far longer than 24 |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
544 hours as a result. A freshly packed Git repository is |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
545 slightly smaller than a Mercurial repository, but an unpacked |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
546 repository is several orders of magnitude larger.</para> |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
547 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
548 <para>The core of Git is written in C. Many Git commands are |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
549 implemented as shell or Perl scripts, and the quality of these |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
550 scripts varies widely. I have encountered several instances |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
551 where scripts charged along blindly in the presence of errors |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
552 that should have been fatal.</para> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
553 |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
554 <para>Mercurial can import revision history from a Git |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
555 repository.</para> |
280
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
556 |
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
557 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
558 </sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
559 <sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
560 <title>CVS</title> |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
561 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
562 <para>CVS is probably the most widely used revision control tool |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
563 in the world. Due to its age and internal untidiness, it has |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
564 been only lightly maintained for many years.</para> |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
565 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
566 <para>It has a centralised client/server architecture. It does |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
567 not group related file changes into atomic commits, making it |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
568 easy for people to <quote>break the build</quote>: one person |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
569 can successfully commit part of a change and then be blocked |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
570 by the need for a merge, causing other people to see only a |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
571 portion of the work they intended to do. This also affects |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
572 how you work with project history. If you want to see all of |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
573 the modifications someone made as part of a task, you will |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
574 need to manually inspect the descriptions and timestamps of |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
575 the changes made to each file involved (if you even know what |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
576 those files were).</para> |
256
649a93bb45ae
Fiddle with the sections on SVN and CVS.
Bryan O'Sullivan <bos@serpentine.com>
parents:
221
diff
changeset
|
577 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
578 <para>CVS has a muddled notion of tags and branches that I will |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
579 not attempt to even describe. It does not support renaming of |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
580 files or directories well, making it easy to corrupt a |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
581 repository. It has almost no internal consistency checking |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
582 capabilities, so it is usually not even possible to tell |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
583 whether or how a repository is corrupt. I would not recommend |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
584 CVS for any project, existing or new.</para> |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
585 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
586 <para>Mercurial can import CVS revision history. However, there |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
587 are a few caveats that apply; these are true of every other |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
588 revision control tool's CVS importer, too. Due to CVS's lack |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
589 of atomic changes and unversioned filesystem hierarchy, it is |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
590 not possible to reconstruct CVS history completely accurately; |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
591 some guesswork is involved, and renames will usually not show |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
592 up. Because a lot of advanced CVS administration has to be |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
593 done by hand and is hence error-prone, it's common for CVS |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
594 importers to run into multiple problems with corrupted |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
595 repositories (completely bogus revision timestamps and files |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
596 that have remained locked for over a decade are just two of |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
597 the less interesting problems I can recall from personal |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
598 experience).</para> |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
599 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
600 <para>Mercurial can import revision history from a CVS |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
601 repository.</para> |
280
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
602 |
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
603 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
604 </sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
605 <sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
606 <title>Commercial tools</title> |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
607 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
608 <para>Perforce has a centralised client/server architecture, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
609 with no client-side caching of any data. Unlike modern |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
610 revision control tools, Perforce requires that a user run a |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
611 command to inform the server about every file they intend to |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
612 edit.</para> |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
613 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
614 <para>The performance of Perforce is quite good for small teams, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
615 but it falls off rapidly as the number of users grows beyond a |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
616 few dozen. Modestly large Perforce installations require the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
617 deployment of proxies to cope with the load their users |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
618 generate.</para> |
16
81454425eee9
Progress on a few fronts, mainly indexing and MQ chapter content
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
619 |
280
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
620 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
621 </sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
622 <sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
623 <title>Choosing a revision control tool</title> |
280
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
624 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
625 <para>With the exception of CVS, all of the tools listed above |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
626 have unique strengths that suit them to particular styles of |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
627 work. There is no single revision control tool that is best |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
628 in all situations.</para> |
280
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
629 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
630 <para>As an example, Subversion is a good choice for working |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
631 with frequently edited binary files, due to its centralised |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
632 nature and support for file locking.</para> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
633 |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
634 <para>I personally find Mercurial's properties of simplicity, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
635 performance, and good merge support to be a compelling |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
636 combination that has served me well for several years.</para> |
280
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
637 |
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
638 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
639 </sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
640 </sect1> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
641 <sect1> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
642 <title>Switching from another tool to Mercurial</title> |
280
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
643 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
644 <para>Mercurial is bundled with an extension named <literal |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
645 role="hg-ext">convert</literal>, which can incrementally |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
646 import revision history from several other revision control |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
647 tools. By <quote>incremental</quote>, I mean that you can |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
648 convert all of a project's history to date in one go, then rerun |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
649 the conversion later to obtain new changes that happened after |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
650 the initial conversion.</para> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
651 |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
652 <para>The revision control tools supported by <literal |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
653 role="hg-ext">convert</literal> are as follows:</para> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
654 <itemizedlist> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
655 <listitem><para>Subversion</para></listitem> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
656 <listitem><para>CVS</para></listitem> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
657 <listitem><para>Git</para></listitem> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
658 <listitem><para>Darcs</para></listitem></itemizedlist> |
280
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
659 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
660 <para>In addition, <literal role="hg-ext">convert</literal> can |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
661 export changes from Mercurial to Subversion. This makes it |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
662 possible to try Subversion and Mercurial in parallel before |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
663 committing to a switchover, without risking the loss of any |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
664 work.</para> |
280
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
665 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
666 <para>The <command role="hg-ext-conver">convert</command> command |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
667 is easy to use. Simply point it at the path or URL of the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
668 source repository, optionally give it the name of the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
669 destination repository, and it will start working. After the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
670 initial conversion, just run the same command again to import |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
671 new changes.</para> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
672 </sect1> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
673 </chapter> |
280
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
674 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
675 <!-- |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
676 local variables: |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
677 sgml-parent-document: ("00book.xml" "book" "chapter") |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
678 end: |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
679 --> |