annotate ja/intro.tex @ 293:3b1291f24c0d

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