Mercurial > hgbook
annotate en/ch01-intro.xml @ 671:13513d2a128d
Add sensible names to chapters.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Mon, 09 Mar 2009 23:37:29 -0700 |
parents | 21c62e09b99f |
children | cfdb601a3c8b |
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"> |
671
13513d2a128d
Add sensible names to chapters.
Bryan O'Sullivan <bos@serpentine.com>
parents:
660
diff
changeset
|
4 <?dbhtml filename="introduction.html"?> |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
5 <title>Introduction</title> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
6 |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
7 <sect1> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
8 <title>About revision control</title> |
217
369858a4d63c
Start to flesh out chapter 1.
Bryan O'Sullivan <bos@serpentine.com>
parents:
155
diff
changeset
|
9 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
10 <para>Revision control is the process of managing multiple |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
11 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
|
12 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
|
13 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
|
14 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
|
15 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
16 <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
|
17 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
|
18 this process have long been available. The earliest automated |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
19 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
|
20 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
|
21 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
|
22 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
|
23 together. The best modern revision control tools have no |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
24 problem coping with thousands of people working together on |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
25 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
|
26 |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
27 <sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
28 <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
|
29 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
30 <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
|
31 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
|
32 project.</para> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
33 <itemizedlist> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
34 <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
|
35 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
|
36 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
|
37 <emphasis>why</emphasis> they made it; |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
38 <emphasis>when</emphasis> they made it; and |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
39 <emphasis>what</emphasis> the change |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
40 was.</para></listitem> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
41 <listitem><para>When you're working with other people, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
42 revision control software makes it easier for you to |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
43 collaborate. For example, when people more or less |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
44 simultaneously make potentially incompatible changes, the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
45 software will help you to identify and resolve those |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
46 conflicts.</para></listitem> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
47 <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
|
48 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
|
49 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
|
50 fact, a <emphasis>really</emphasis> good revision control |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
51 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
|
52 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
|
53 linkend="sec:undo:bisect"/> for details).</para></listitem> |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
54 <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
|
55 and manage the drift between, multiple versions of your |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
56 project.</para></listitem></itemizedlist> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
57 <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
|
58 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
|
59 with a hundred other people.</para> |
218
75fd236d736b
History of SCM tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
217
diff
changeset
|
60 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
61 <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
|
62 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
|
63 <quote>huge team</quote>) is how its |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
64 <emphasis>benefits</emphasis> compare to its |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
65 <emphasis>costs</emphasis>. A revision control tool that's |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
66 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
|
67 cost.</para> |
218
75fd236d736b
History of SCM tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
217
diff
changeset
|
68 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
69 <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
|
70 its own weight almost immediately without a revision control |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
71 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
|
72 control might hardly seem worth considering, since |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
73 <emphasis>without</emphasis> it, failure is almost |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
74 guaranteed.</para> |
218
75fd236d736b
History of SCM tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
217
diff
changeset
|
75 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
76 <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
|
77 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
|
78 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
|
79 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
|
80 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
81 <para>Mercurial uniquely supports <emphasis>both</emphasis> of |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
82 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
|
83 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
|
84 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
|
85 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
|
86 command sequences competing for mental space with whatever |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
87 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
|
88 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
|
89 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
|
90 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
91 <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
|
92 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
|
93 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
|
94 |
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 <sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
97 <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
|
98 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
99 <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
|
100 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
|
101 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
|
102 encounter:</para> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
103 <itemizedlist> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
104 <listitem><para>Revision control (RCS)</para></listitem> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
105 <listitem><para>Software configuration management (SCM), or |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
106 configuration management</para></listitem> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
107 <listitem><para>Source code management</para></listitem> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
108 <listitem><para>Source code control, or source |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
109 control</para></listitem> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
110 <listitem><para>Version control |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
111 (VCS)</para></listitem></itemizedlist> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
112 <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
|
113 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
|
114 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
|
115 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
116 </sect2> |
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 <sect1> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
119 <title>A short history of revision control</title> |
218
75fd236d736b
History of SCM tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
217
diff
changeset
|
120 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
121 <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
|
122 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
|
123 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
|
124 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
|
125 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
|
126 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
|
127 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
|
128 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
|
129 modifying those files without the help of an |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
130 administrator.</para> |
218
75fd236d736b
History of SCM tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
217
diff
changeset
|
131 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
132 <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
|
133 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
|
134 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
|
135 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
|
136 modifying them simultaneously.</para> |
218
75fd236d736b
History of SCM tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
217
diff
changeset
|
137 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
138 <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
|
139 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
|
140 renamed to CVS (Concurrent Versions System). The big innovation |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
141 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
|
142 somewhat independently in their own personal workspaces. The |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
143 personal workspaces prevented developers from stepping on each |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
144 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
|
145 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
|
146 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
|
147 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
|
148 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
149 <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
|
150 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
|
151 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
|
152 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
|
153 client/server architecture. CVS's architecture is centralised; |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
154 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
|
155 workspaces just contain copies of recent versions of the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
156 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
|
157 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
|
158 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
|
159 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
160 <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
|
161 distributed revision control system, called TeamWare. A |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
162 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
|
163 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
|
164 relied upon RCS for its history storage; TeamWare used |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
165 SCCS.)</para> |
218
75fd236d736b
History of SCM tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
217
diff
changeset
|
166 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
167 <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
|
168 problems with CVS. It records simultaneous changes to multiple |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
169 files individually, instead of grouping them together as a |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
170 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
|
171 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
|
172 renaming files and directories. Worse, its source code is |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
173 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
|
174 level</quote> of fixing these architectural problems |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
175 prohibitive.</para> |
218
75fd236d736b
History of SCM tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
217
diff
changeset
|
176 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
177 <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
|
178 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
|
179 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
|
180 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
|
181 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
|
182 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
|
183 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
|
184 has rapidly grown in popularity.</para> |
218
75fd236d736b
History of SCM tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
217
diff
changeset
|
185 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
186 <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
|
187 an ambitious distributed revision control system that he named |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
188 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
|
189 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
|
190 subsequent) revision control tools in a number of innovative |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
191 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
|
192 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
|
193 sources.</para> |
218
75fd236d736b
History of SCM tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
217
diff
changeset
|
194 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
195 <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
|
196 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
|
197 use, high performance, and scalability to very large |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
198 projects.</para> |
155
914babdc99c8
run-example: better error if bogus section name found.
Bryan O'Sullivan <bos@serpentine.com>
parents:
16
diff
changeset
|
199 |
652
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 <sect1> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
202 <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
|
203 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
204 <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
|
205 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
|
206 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
|
207 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
|
208 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
209 <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
|
210 individual computers. Although these tools represented a huge |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
211 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
|
212 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
|
213 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
|
214 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
215 <para>The second generation loosened these constraints by moving |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
216 to network-centered architectures, and managing entire projects |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
217 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
|
218 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
|
219 scaling became an issue for large projects. An unreliable |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
220 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
|
221 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
|
222 making read-only access available anonymously to anyone, people |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
223 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
|
224 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
|
225 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
|
226 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
227 <para>The current generation of revision control tools is |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
228 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
|
229 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
|
230 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
|
231 needed. Collaboration over the Internet has moved from |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
232 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
|
233 Modern tools can operate offline indefinitely and autonomously, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
234 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
|
235 another repository.</para> |
155
914babdc99c8
run-example: better error if bogus section name found.
Bryan O'Sullivan <bos@serpentine.com>
parents:
16
diff
changeset
|
236 |
652
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 <sect1> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
239 <title>A few of the advantages of distributed revision |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
240 control</title> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
241 |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
242 <para>Even though distributed revision control tools have for |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
243 several years been as robust and usable as their |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
244 previous-generation counterparts, people using older tools have |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
245 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
|
246 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
|
247 centralised ones.</para> |
219
15a6fd2ba582
Start talking about the advantages of distributed tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
218
diff
changeset
|
248 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
249 <para>For an individual developer, distributed tools are almost |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
250 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
|
251 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
|
252 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
|
253 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
|
254 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
|
255 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
|
256 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
|
257 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
|
258 control software.</para> |
155
914babdc99c8
run-example: better error if bogus section name found.
Bryan O'Sullivan <bos@serpentine.com>
parents:
16
diff
changeset
|
259 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
260 <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
|
261 server infrastructure, again because they replicate metadata to |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
262 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
|
263 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
|
264 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
|
265 worked. With a distributed tool, you have many backups |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
266 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
|
267 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
268 <para>The reliability of your network will affect distributed |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
269 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
|
270 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
|
271 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
|
272 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
|
273 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
|
274 to repositories on other computers, something that is relatively |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
275 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
|
276 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
|
277 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
278 <sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
279 <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
|
280 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
281 <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
|
282 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
|
283 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
|
284 peer with the people who consider themselves the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
285 <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
|
286 repositories, you can immediately copy their project history, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
287 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
|
288 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
|
289 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
|
290 only</quote> mode unless someone grants you permission to |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
291 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
|
292 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
|
293 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
|
294 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
|
295 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
296 <sect3> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
297 <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
|
298 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
299 <para>It has been suggested that distributed revision control |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
300 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
|
301 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
|
302 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
|
303 opinion or attitude between groups of developers that cause |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
304 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
|
305 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
|
306 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
|
307 direction.</para> |
220
0ca9045035f7
Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
219
diff
changeset
|
308 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
309 <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
|
310 differences. With a centralised revision control system, the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
311 <emphasis>technical</emphasis> process of reconciliation is |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
312 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
|
313 to decide whose revision history is going to |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
314 <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
|
315 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
|
316 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
|
317 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
318 <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
|
319 they make forking the <emphasis>only</emphasis> way to |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
320 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
|
321 potentially a fork point. The great strength of this |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
322 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
|
323 be really good at <emphasis>merging</emphasis> forks, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
324 because forks are absolutely fundamental: they happen all |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
325 the time.</para> |
220
0ca9045035f7
Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
219
diff
changeset
|
326 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
327 <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
|
328 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
|
329 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
|
330 becomes <emphasis>purely</emphasis> a social issue. If |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
331 anything, distributed tools <emphasis>lower</emphasis> the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
332 likelihood of a fork:</para> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
333 <itemizedlist> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
334 <listitem><para>They eliminate the social distinction that |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
335 centralised tools impose: that between insiders (people |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
336 with commit access) and outsiders (people |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
337 without).</para></listitem> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
338 <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
|
339 social fork, because all that's involved from the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
340 perspective of the revision control software is just |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
341 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
|
342 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
343 <para>Some people resist distributed tools because they want |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
344 to retain tight control over their projects, and they |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
345 believe that centralised tools give them this control. |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
346 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
|
347 or Subversion repositories publicly, there are plenty of |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
348 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
|
349 history (albeit slowly) and recreate it somewhere that you |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
350 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
|
351 illusory, you are forgoing the ability to fluidly |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
352 collaborate with whatever people feel compelled to mirror |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
353 and fork your history.</para> |
220
0ca9045035f7
Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
219
diff
changeset
|
354 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
355 </sect3> |
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 <sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
358 <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
|
359 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
360 <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
|
361 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
|
362 central server will see slower command execution and perhaps |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
363 less reliability. Commercial revision control systems attempt |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
364 to ameliorate these problems with remote-site replication |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
365 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
|
366 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
|
367 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
|
368 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
|
369 there's no redundant communication between repositories over |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
370 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
|
371 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
372 <para>Centralised revision control systems tend to have |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
373 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
|
374 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
|
375 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
|
376 response tends to be an expensive and clunky replication |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
377 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
|
378 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
|
379 (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
|
380 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
|
381 replication to balance load becomes a simple matter of |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
382 scripting.</para> |
220
0ca9045035f7
Advantages for open source and commercial tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
219
diff
changeset
|
383 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
384 <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
|
385 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
|
386 revision control. The tool will let them generate custom |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
387 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
|
388 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
|
389 regressions in the customer's environment, all without needing |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
390 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
|
391 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
392 </sect2> |
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 <sect1> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
395 <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
|
396 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
397 <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
|
398 particularly good choice as a revision control system.</para> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
399 <itemizedlist> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
400 <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
|
401 <listitem><para>It is lightweight.</para></listitem> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
402 <listitem><para>It scales excellently.</para></listitem> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
403 <listitem><para>It is easy to |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
404 customise.</para></listitem></itemizedlist> |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
405 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
406 <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
|
407 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
|
408 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
|
409 minutes longer. Mercurial's command and feature sets are |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
410 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
|
411 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
|
412 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
413 <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
|
414 moments. Creating new changes and branches; transferring changes |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
415 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
|
416 status operations are all fast. Mercurial attempts to stay |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
417 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
|
418 overhead with blazingly fast operations.</para> |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
419 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
420 <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
|
421 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
|
422 contributors, each containing tens of thousands of files and |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
423 hundreds of megabytes of source code.</para> |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
424 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
425 <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
|
426 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
|
427 scripting tasks, and its clean internals and implementation in |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
428 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
|
429 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
|
430 available, ranging from helping to identify bugs to improving |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
431 performance.</para> |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
432 |
652
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 <sect1> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
435 <title>Mercurial compared with other tools</title> |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
436 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
437 <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
|
438 necessarily reflects my own experiences, interests, and (dare I |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
439 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
|
440 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
|
441 time.</para> |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
442 |
280
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
443 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
444 <sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
445 <title>Subversion</title> |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
446 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
447 <para>Subversion is a popular revision control tool, developed |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
448 to replace CVS. It has a centralised client/server |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
449 architecture.</para> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
450 |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
451 <para>Subversion and Mercurial have similarly named commands for |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
452 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
|
453 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
|
454 portable to all popular operating systems.</para> |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
455 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
456 <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
|
457 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
|
458 is new, and known to be <ulink |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
459 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
|
460 and buggy</ulink>.</para> |
256
649a93bb45ae
Fiddle with the sections on SVN and CVS.
Bryan O'Sullivan <bos@serpentine.com>
parents:
221
diff
changeset
|
461 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
462 <para>Mercurial has a substantial performance advantage over |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
463 Subversion on every revision control operation I have |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
464 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
|
465 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
|
466 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
|
467 fastest access method available. In more realistic |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
468 deployments involving a network-based store, Subversion will |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
469 be at a substantially larger disadvantage. Because many |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
470 Subversion commands must talk to the server and Subversion |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
471 does not have useful replication facilities, server capacity |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
472 and network bandwidth become bottlenecks for modestly large |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
473 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
|
474 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
475 <para>Additionally, Subversion incurs substantial storage |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
476 overhead to avoid network transactions for a few common |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
477 operations, such as finding modified files |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
478 (<literal>status</literal>) and displaying modifications |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
479 against the current revision (<literal>diff</literal>). As a |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
480 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
|
481 or larger than, a Mercurial repository and working directory, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
482 even though the Mercurial repository contains a complete |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
483 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
|
484 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
485 <para>Subversion is widely supported by third party tools. |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
486 Mercurial currently lags considerably in this area. This gap |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
487 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
|
488 now outshine their Subversion equivalents. Like Mercurial, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
489 Subversion has an excellent user manual.</para> |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
490 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
491 <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
|
492 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
|
493 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
|
494 revisions to an incompressible 10MB file, Subversion's |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
495 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
|
496 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
|
497 of revisions, because the differences between each revision |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
498 are large.</para> |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
499 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
500 <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
|
501 impossible to merge different versions of a binary file. |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
502 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
|
503 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
|
504 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
|
505 are widely used.</para> |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
506 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
507 <para>Mercurial can import revision history from a Subversion |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
508 repository. It can also export revision history to a |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
509 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
|
510 waters</quote> and use Mercurial and Subversion in parallel |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
511 before deciding to switch. History conversion is incremental, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
512 so you can perform an initial conversion, then small |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
513 additional conversions afterwards to bring in new |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
514 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
|
515 |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
516 |
652
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 <sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
519 <title>Git</title> |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
520 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
521 <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
|
522 developed for managing the Linux kernel source tree. Like |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
523 Mercurial, its early design was somewhat influenced by |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
524 Monotone.</para> |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
525 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
526 <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
|
527 providing 139 individual commands. It has something of a |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
528 reputation for being difficult to learn. Compared to Git, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
529 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
|
530 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
531 <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
|
532 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
|
533 while Mercurial performs better on other operations. However, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
534 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
|
535 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
|
536 Mercurial.</para> |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
537 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
538 <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
|
539 repository requires frequent manual <quote>repacks</quote> of |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
540 its metadata. Without these, performance degrades, while |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
541 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
|
542 repositories that are not rigorously and frequently repacked |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
543 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
|
544 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
|
545 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
|
546 slightly smaller than a Mercurial repository, but an unpacked |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
547 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
|
548 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
549 <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
|
550 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
|
551 scripts varies widely. I have encountered several instances |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
552 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
|
553 that should have been fatal.</para> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
554 |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
555 <para>Mercurial can import revision history from a Git |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
556 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
|
557 |
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
558 |
652
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 <sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
561 <title>CVS</title> |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
562 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
563 <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
|
564 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
|
565 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
|
566 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
567 <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
|
568 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
|
569 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
|
570 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
|
571 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
|
572 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
|
573 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
|
574 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
|
575 need to manually inspect the descriptions and timestamps of |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
576 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
|
577 those files were).</para> |
256
649a93bb45ae
Fiddle with the sections on SVN and CVS.
Bryan O'Sullivan <bos@serpentine.com>
parents:
221
diff
changeset
|
578 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
579 <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
|
580 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
|
581 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
|
582 repository. It has almost no internal consistency checking |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
583 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
|
584 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
|
585 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
|
586 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
587 <para>Mercurial can import CVS revision history. However, there |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
588 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
|
589 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
|
590 of atomic changes and unversioned filesystem hierarchy, it is |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
591 not possible to reconstruct CVS history completely accurately; |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
592 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
|
593 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
|
594 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
|
595 importers to run into multiple problems with corrupted |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
596 repositories (completely bogus revision timestamps and files |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
597 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
|
598 the less interesting problems I can recall from personal |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
599 experience).</para> |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
600 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
601 <para>Mercurial can import revision history from a CVS |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
602 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
|
603 |
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
604 |
652
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 <sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
607 <title>Commercial tools</title> |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
608 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
609 <para>Perforce has a centralised client/server architecture, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
610 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
|
611 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
|
612 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
|
613 edit.</para> |
221
680b7b055aa7
Brief comparisons with other tools.
Bryan O'Sullivan <bos@serpentine.com>
parents:
220
diff
changeset
|
614 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
615 <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
|
616 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
|
617 few dozen. Modestly large Perforce installations require the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
618 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
|
619 generate.</para> |
16
81454425eee9
Progress on a few fronts, mainly indexing and MQ chapter content
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
620 |
280
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
621 |
652
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 <sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
624 <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
|
625 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
626 <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
|
627 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
|
628 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
|
629 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
|
630 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
631 <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
|
632 with frequently edited binary files, due to its centralised |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
633 nature and support for file locking.</para> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
634 |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
635 <para>I personally find Mercurial's properties of simplicity, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
636 performance, and good merge support to be a compelling |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
637 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
|
638 |
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
639 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
640 </sect2> |
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 <sect1> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
643 <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
|
644 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
645 <para>Mercurial is bundled with an extension named <literal |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
646 role="hg-ext">convert</literal>, which can incrementally |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
647 import revision history from several other revision control |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
648 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
|
649 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
|
650 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
|
651 the initial conversion.</para> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
652 |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
653 <para>The revision control tools supported by <literal |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
654 role="hg-ext">convert</literal> are as follows:</para> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
655 <itemizedlist> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
656 <listitem><para>Subversion</para></listitem> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
657 <listitem><para>CVS</para></listitem> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
658 <listitem><para>Git</para></listitem> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
659 <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
|
660 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
661 <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
|
662 export changes from Mercurial to Subversion. This makes it |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
663 possible to try Subversion and Mercurial in parallel before |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
664 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
|
665 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
|
666 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
667 <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
|
668 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
|
669 source repository, optionally give it the name of the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
670 destination repository, and it will start working. After the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
671 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
|
672 new changes.</para> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
673 </sect1> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
674 </chapter> |
280
4700dd38384c
Bring the comparison section up to date and more into balance.
Bryan O'Sullivan <bos@serpentine.com>
parents:
263
diff
changeset
|
675 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
676 <!-- |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
677 local variables: |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
678 sgml-parent-document: ("00book.xml" "book" "chapter") |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
679 end: |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
680 --> |