Commits

Anonymous committed 3b33dd6 Merge

Comments (0)

Files changed (12)

 .run
 .validated-00book.xml
 en/all-ids.dat
+en/complete.xml
+en/svn
 web/hgbook/.database.sqlite3
 web/hgbook/secrets.py
 web/index-read.html.in
   -->
   <subtitle>Compiled from $rev_id$</subtitle>
   <bookinfo>
+    <edition>1</edition>
+    <isbn>9780596800673</isbn>
     <authorgroup>
       <author>
         <firstname>Bryan</firstname>
     </copyright>
   </bookinfo>
 
+  <!-- BEGIN ch00 -->
   &ch00;
+  <!-- BEGIN ch01 -->
   &ch01;
+  <!-- BEGIN ch02 -->
   &ch02;
+  <!-- BEGIN ch03 -->
   &ch03;
+  <!-- BEGIN ch04 -->
   &ch04;
+  <!-- BEGIN ch05 -->
   &ch05;
+  <!-- BEGIN ch06 -->
   &ch06;
+  <!-- BEGIN ch07 -->
   &ch07;
+  <!-- BEGIN ch08 -->
   &ch08;
+  <!-- BEGIN ch09 -->
   &ch09;
+  <!-- BEGIN ch10 -->
   &ch10;
+  <!-- BEGIN ch11 -->
   &ch11;
+  <!-- BEGIN ch12 -->
   &ch12;
+  <!-- BEGIN ch13 -->
   &ch13;
+  <!-- BEGIN appA -->
   <!-- &appA; -->
+  <!-- BEGIN appB -->
   &appB;
+  <!-- BEGIN appC -->
   &appC;
+  <!-- BEGIN appD -->
   &appD;
 </book>
 hg-version = $(shell hg version -q | \
 		     sed 's,.*(version \(unknown\|[a-f0-9+]*\)),\1,')
 
-all: web
+all: web complete.xml
 
 ../stylesheets/system-xsl: $(system-xsl-dir)
 	ln -s $< $@
 html: $(obj-web-read)/index.html
 
 ../web/index-read.html.in: ../web/genindex.py $(xml-src-files)
-	$<
+	cd ../web && ./genindex.py
 
 $(obj-web-read)/index.html: ../stylesheets/system-xsl .validated-00book.xml ../web/index-read.html.in
 	xsltproc $(xsltproc-opts) -o $(obj-web-read)/x ../stylesheets/chunk-stylesheet.xsl 00book.xml
 	cp ../stylesheets/system-xsl/images/*.png $(obj-websup)/figs
 	cp -f ../web/icons/*.png $(obj-websup)/figs
 
+complete.xml: .validated-00book.xml
+	$(xsltproc) $(xsltproc-opts) -o $@ ../stylesheets/dtd-profile.xsl 00book.xml
+
 all-ids.dat: ../stylesheets/all-ids.xsl $(xml-src-files)
 	$(xsltproc) $(xsltproc-opts) -o $@ ../stylesheets/all-ids.xsl 00book.xml
 
 
 valid: .validated-00book.xml
 
-.validated-00book.xml: $(xml-src-files)
+.validated-00book.xml: $(xml-src-files) examples/.run
 	$(xmllint) --path '$(dtd-dir):$(xml-path)' $(xmllint-opts) $<
 	touch $@
 
 examples: $(example-prereqs) examples/.run
 
 examples/.run: $(example-sources)
-	cd examples && ./run-example
+	cd examples && ./run-example -a
 
 examples/%.run: examples/% examples/run-example
 

en/ch00-preface.xml

 	    project.</para></listitem>
       </itemizedlist>
 
-      <para id="x_76">Most of these reasons are equally valid---at least in
-	theory---whether you're working on a project by yourself, or
-	with a hundred other people.</para>
+      <para id="x_76">Most of these reasons are equally
+	valid&emdash;at least in theory&emdash;whether you're working
+	on a project by yourself, or with a hundred other
+	people.</para>
 
       <para id="x_77">A key question about the practicality of revision control
 	at these two different scales (<quote>lone hacker</quote> and
     <title>About the examples in this book</title>
 
     <para id="x_84">This book takes an unusual approach to code samples.  Every
-      example is <quote>live</quote>---each one is actually the result
+      example is <quote>live</quote>&emdash;each one is actually the result
       of a shell script that executes the Mercurial commands you see.
       Every time an image of the book is built from its sources, all
       the example scripts are automatically run, and their current
 	centralised system to fall over under the combined load of
 	just a few dozen concurrent users.  Once again, the typical
 	response tends to be an expensive and clunky replication
-	facility.  Since the load on a central server---if you have
-	one at all---is many times lower with a distributed tool
+	facility.  Since the load on a central server&emdash;if you have
+	one at all&emdash;is many times lower with a distributed tool
 	(because all of the data is replicated everywhere), a single
 	cheap server can handle the needs of a much larger team, and
 	replication to balance load becomes a simple matter of

en/ch01-tour-basic.xml

       using Mercurial on your computer immediately.</para>
 
     <sect2>
+      <title>Windows</title>
+
+      <para id="x_c">The best version of Mercurial for Windows is
+	TortoiseHg, which can be found at <ulink
+	  url="http://bitbucket.org/tortoisehg/stable/wiki/Home">http://bitbucket.org/tortoisehg/stable/wiki/Home</ulink>. 
+	This package has no external dependencies; it <quote>just
+	  works</quote>.  It provides both command line and graphical
+	user interfaces.</para>
+
+    </sect2>
+
+    <sect2>
+      <title>Mac OS X</title>
+
+      <para id="x_a">Lee Cantey publishes an installer of Mercurial
+	for Mac OS X at <ulink
+	  url="http://mercurial.berkwood.com">http://mercurial.berkwood.com</ulink>.</para>
+    </sect2>
+
+    <sect2>
       <title>Linux</title>
 
       <para id="x_2">Because each Linux distribution has its own packaging
 	<literal>mercurial</literal>.</para>
 
       <itemizedlist>
-	<listitem><para id="x_4">Debian:</para>
+	<listitem><para id="x_4">Ubuntu and Debian:</para>
 	  <programlisting>apt-get install mercurial</programlisting></listitem>
-	<listitem><para id="x_5">Fedora Core:</para>
+	<listitem><para id="x_5">Fedora and OpenSUSE:</para>
 	  <programlisting>yum install mercurial</programlisting></listitem>
 	<listitem><para id="x_6">Gentoo:</para>
 	  <programlisting>emerge mercurial</programlisting></listitem>
-	<listitem><para id="x_7">OpenSUSE:</para>
-	  <programlisting>yum install mercurial</programlisting></listitem>
-	<listitem><para id="x_8">Ubuntu: Ubuntu's Mercurial package is based on
-	    Debian's.  To install it, run the following
-	    command.</para>
-	  <programlisting>apt-get install mercurial</programlisting></listitem>
       </itemizedlist>
 
     </sect2>
 
       <para id="x_9">SunFreeWare, at <ulink
 	  url="http://www.sunfreeware.com">http://www.sunfreeware.com</ulink>, 
-	is a good source for a large number of pre-built Solaris
-	packages for 32 and 64 bit Intel and Sparc architectures,
-	including current versions of Mercurial.</para>
+	provides prebuilt packages of Mercurial.</para>
 
     </sect2>
-    <sect2>
-      <title>Mac OS X</title>
 
-      <para id="x_a">Lee Cantey publishes an installer of Mercurial for Mac OS
-	X at <ulink
-	  url="http://mercurial.berkwood.com">http://mercurial.berkwood.com</ulink>. 
-	This package works on both Intel- and Power-based Macs. Before
-	you can use it, you must install a compatible version of
-	Universal MacPython <citation>web:macpython</citation>. This
-	is easy to do; simply follow the instructions on Lee's
-	site.</para>
+  </sect1>
 
-      <para id="x_b">It's also possible to install Mercurial using Fink or
-	MacPorts, two popular free package managers for Mac OS X.  If
-	you have Fink, use <command>sudo apt-get install
-	  mercurial-py25</command>.  If MacPorts, <command>sudo port
-	  install mercurial</command>.</para>
-
-    </sect2>
-    <sect2>
-      <title>Windows</title>
-
-      <para id="x_c">Lee Cantey publishes an installer of Mercurial for Windows
-	at <ulink
-	  url="http://mercurial.berkwood.com">http://mercurial.berkwood.com</ulink>. 
-	This package has no external dependencies; it <quote>just
-	  works</quote>.</para>
-
-      <note>
-	<para id="x_d">  The Windows version of Mercurial does not
-	  automatically convert line endings between Windows and Unix
-	  styles.  If you want to share work with Unix users, you must
-	  do a little additional configuration work. XXX Flesh this
-	  out.</para>
-      </note>
-
-    </sect2>
-  </sect1>
   <sect1>
     <title>Getting started</title>
 
 	command to make a copy of a repository, it's best to use a
 	built-in command that Mercurial provides.  This command is
 	called <command role="hg-cmd">hg clone</command>, because it
-	creates an identical copy of an existing repository.</para>
+	makes an identical copy of an existing repository.</para>
 
       &interaction.tour.clone;
 
+      <para>One advantage of using <command role="hg-cmd">hg
+	  clone</command> is that, as we can see above, it lets us clone
+	repositories over the network.  Another is that it remembers
+	where we cloned from, which we'll find useful soon when we
+	want to fetch new changes from another repository.</para>
+
       <para id="x_14">If our clone succeeded, we should now have a local
 	directory called <filename class="directory">hello</filename>.
 	This directory will contain some files.</para>
       <para id="x_15">These files have the same contents and history in our
 	repository as they do in the repository we cloned.</para>
 
-      <para id="x_16">Every Mercurial repository is complete, self-contained,
-	and independent.  It contains its own private copy of a
-	project's files and history.  A cloned repository remembers
-	the location of the repository it was cloned from, but it does
-	not communicate with that repository, or any other, unless you
-	tell it to.</para>
+      <para id="x_16">Every Mercurial repository is complete,
+	self-contained, and independent.  It contains its own private
+	copy of a project's files and history.  As we just mentioned,
+	a cloned repository remembers the location of the repository
+	it was cloned from, but Mercurial will not communicate with
+	that repository, or any other, unless you tell it to.</para>
 
       <para id="x_17">What this means for now is that we're free to experiment
 	with our repository, safe in the knowledge that it's a private
     <para id="x_1b">One of the first things we might want to do with a new,
       unfamiliar repository is understand its history.  The <command
 	role="hg-cmd">hg log</command> command gives us a view of
-      history.</para>
+      the history of changes in the repository.</para>
 
     &interaction.tour.log;
 
 
     <para id="x_1d">The fields in a record of output from <command
 	role="hg-cmd">hg log</command> are as follows.</para>
+
     <itemizedlist>
-      <listitem><para id="x_1e"><literal>changeset</literal>: This field has the
-	  format of a number, followed by a colon, followed by a
-	  hexadecimal string.  These are
-	  <emphasis>identifiers</emphasis> for the changeset.  There
-	  are two identifiers because the number is shorter and easier
-	  to type than the hex string.</para></listitem>
+      <listitem><para id="x_1e"><literal>changeset</literal>: This
+	  field has the format of a number, followed by a colon,
+	  followed by a hexadecimal (or <emphasis>hex</emphasis>)
+	  string.  These are <emphasis>identifiers</emphasis> for the
+	  changeset.  The hex string is a unique identifier: the same
+	  hex string will always refer to the same changeset. The
+	  number is shorter and easier to type than the hex string,
+	  but it isn't unique: the same number in two different clones
+	  of a repository may identify different changesets.  Why
+	  provide the number at all, then?  For local
+	  convenience.</para>
+      </listitem>
       <listitem><para id="x_1f"><literal>user</literal>: The identity of the
 	  person who created the changeset.  This is a free-form
 	  field, but it most often contains a person's name and email
 	  person who created the changeset.)</para></listitem>
       <listitem><para id="x_21"><literal>summary</literal>: The first line of
 	  the text message that the creator of the changeset entered
-	  to describe the changeset.</para></listitem></itemizedlist>
-    <para id="x_22">The default output printed by <command role="hg-cmd">hg
-	log</command> is purely a summary; it is missing a lot of
-      detail.</para>
+	  to describe the changeset.</para></listitem>
+      <listitem>
+	<para>Some changesets, such as the first in the list above,
+	  have a <literal>tag</literal> field.  A tag is another way
+	  to identify a changeset, by giving it an easy-to-remember
+	  name. (The tag named <literal>tip</literal> is special: it
+	  always refers to the newest change in a repository.)</para>
+      </listitem>
+    </itemizedlist>
+
+    <para id="x_22">The default output printed by <command
+	role="hg-cmd">hg log</command> is purely a summary; it is
+      missing a lot of detail.</para>
 
     <para id="x_23"><xref linkend="fig:tour-basic:history"/> provides
       a graphical representation of the history of the <filename
 	  log</command> identifies a changeset using both a number and
 	a hexadecimal string.</para>
       <itemizedlist>
-	<listitem><para id="x_27">The revision number is <emphasis>only valid in
-	      that repository</emphasis>,</para></listitem>
-	<listitem><para id="x_28">while the hex string is the
+	<listitem><para id="x_27">The revision number is a handy
+	    notation that is <emphasis>only valid in that
+	      repository</emphasis>.</para></listitem>
+	<listitem><para id="x_28">The hexadecimal string is the
 	    <emphasis>permanent, unchanging identifier</emphasis> that
 	    will always identify that exact changeset in
 	    <emphasis>every</emphasis> copy of the
 	    repository.</para></listitem></itemizedlist>
-      <para id="x_29">This distinction is important.  If you send someone an
-	email talking about <quote>revision 33</quote>, there's a high
-	likelihood that their revision 33 will <emphasis>not be the
-	  same</emphasis> as yours.  The reason for this is that a
-	revision number depends on the order in which changes arrived
-	in a repository, and there is no guarantee that the same
-	changes will happen in the same order in different
-	repositories. Three changes $a,b,c$ can easily appear in one
-	repository as $0,1,2$, while in another as $1,0,2$.</para>
+
+      <para id="x_29">This distinction is important.  If you send
+	someone an email talking about <quote>revision 33</quote>,
+	there's a high likelihood that their revision 33 will
+	<emphasis>not be the same</emphasis> as yours.  The reason for
+	this is that a revision number depends on the order in which
+	changes arrived in a repository, and there is no guarantee
+	that the same changes will happen in the same order in
+	different repositories. Three changes <literal>a,b,c</literal>
+	can easily appear in one repository as
+	<literal>0,1,2</literal>, while in another as
+	<literal>0,2,1</literal>.</para>
 
       <para id="x_2a">Mercurial uses revision numbers purely as a convenient
 	shorthand.  If you need to discuss a changeset with someone,
 	  log</command> down to a single revision, use the <option
 	  role="hg-opt-log">-r</option> (or <option
 	  role="hg-opt-log">--rev</option>) option.  You can use
-	either a revision number or a long-form changeset identifier,
+	either a revision number or a hexadecimal identifier,
 	and you can provide as many revisions as you want.</para>
 
       &interaction.tour.log-r;
 
       &interaction.tour.log-vp;
 
+      <para>The <option role="hg-opt-log">-p</option> option is
+	tremendously useful, so it's well worth remembering.</para>
+
     </sect2>
   </sect1>
+
   <sect1>
     <title>All about command options</title>
 
       dealing with the options that you can pass to commands.  It
       follows the conventions for options that are common to modern
       Linux and Unix systems.</para>
+
     <itemizedlist>
-      <listitem><para id="x_32">Every option has a long name.  For example, as
+      <listitem>
+	<para id="x_32">Every option has a long name.  For example, as
 	  we've already seen, the <command role="hg-cmd">hg
 	    log</command> command accepts a <option
-	    role="hg-opt-log">--rev</option> option.</para></listitem>
-      <listitem><para id="x_33">Most options have short names, too.  Instead of
-	  <option role="hg-opt-log">--rev</option>, we can use <option
-	    role="hg-opt-log">-r</option>.  (The reason that some
-	  options don't have short names is that the options in
-	  question are rarely used.)</para></listitem>
-      <listitem><para id="x_34">Long options start with two dashes (e.g. <option
-	    role="hg-opt-log">--rev</option>), while short options
-	  start with one (e.g. <option
-	    role="hg-opt-log">-r</option>).</para></listitem>
-      <listitem><para id="x_35">Option naming and usage is consistent across
+	    role="hg-opt-log">--rev</option> option.</para>
+      </listitem>
+      <listitem>
+	<para id="x_33">Most options have short names, too.  Instead
+	  of <option role="hg-opt-log">--rev</option>, we can use
+	  <option role="hg-opt-log">-r</option>.  (The reason that
+	  some options don't have short names is that the options in
+	  question are rarely used.)</para>
+      </listitem>
+      <listitem>
+	<para id="x_34">Long options start with two dashes (e.g.
+	  <option role="hg-opt-log">--rev</option>), while short
+	  options start with one (e.g. <option
+	    role="hg-opt-log">-r</option>).</para>
+      </listitem>
+      <listitem>
+	<para id="x_35">Option naming and usage is consistent across
 	  commands.  For example, every command that lets you specify
 	  a changeset ID or revision number accepts both <option
 	    role="hg-opt-log">-r</option> and <option
-	    role="hg-opt-log">--rev</option>
-	  arguments.</para></listitem></itemizedlist>
+	    role="hg-opt-log">--rev</option> arguments.</para>
+      </listitem>
+      <listitem>
+	<para>If you are using short options, you can save typing by
+	  running them together. For example, the command <command
+	    role="hg-cmd">hg log -v -p -r 2</command> can be written
+	  as <command role="hg-cmd">hg log -vpr2</command>.</para>
+      </listitem>
+    </itemizedlist>
+
     <para id="x_36">In the examples throughout this book, I use short options
       instead of long.  This just reflects my own preference, so don't
       read anything significant into it.</para>
       less when passed <option role="hg-opt-global">-q</option> (or
       <option role="hg-opt-global">--quiet</option>).</para>
 
+    <note>
+      <title>Option naming consistency</title>
+
+      <para>Almost always, Mercurial commands use consistent option
+	names to refer to the same concepts.  For instance, if a
+	command deals with changesets, you'll always identify them
+	with <option role="hg-opt-log">--rev</option> or <option
+	  role="hg-opt-log">-r</option>.  This consistent use of
+	option names makes it easier to remember what options a
+	particular command takes.</para>
+    </note>
+
   </sect1>
   <sect1>
     <title>Making and reviewing changes</title>
       the remote repository.  Since we already have a copy of it
       locally, we can just clone that instead.  This is much faster
       than cloning over the network, and cloning a local repository
-      uses less disk space in most cases, too.</para>
+      uses less disk space in most cases, too<footnote>
+	<para>The saving of space arises when source and destination
+	  repositories are on the same filesystem, in which case
+	  Mercurial will use hardlinks to do copy-on-write sharing of
+	  its internal metadata.  If that explanation meant nothing to
+	  you, don't worry: everything happens transparently and
+	  automatically, and you don't need to understand it.</para>
+	</footnote>.</para>
 
     &interaction.tour.reclone;
 
 
     <para id="x_3b">In our <filename class="directory">my-hello</filename>
       repository, we have a file <filename>hello.c</filename> that
-      contains the classic <quote>hello, world</quote> program. Let's
-      use the ancient and venerable <command>sed</command> command to
-      edit this file so that it prints a second line of output.  (I'm
-      only using <command>sed</command> to do this because it's easy
-      to write a scripted example this way.  Since you're not under
-      the same constraint, you probably won't want to use
-      <command>sed</command>; simply use your preferred text editor to
-      do the same thing.)</para>
+      contains the classic <quote>hello, world</quote> program.</para>
 
-    &interaction.tour.sed;
+    &interaction.tour.cat1;
+
+    <para>Let's edit this file so that it prints a second line of
+      output.</para>
+
+    &interaction.tour.cat2;
 
     <para id="x_3c">Mercurial's <command role="hg-cmd">hg status</command>
       command will tell us what Mercurial knows about the files in the
       file after we were done; it was able to figure this out
       itself.</para>
 
-    <para id="x_3f">It's a little bit helpful to know that we've modified
+    <para id="x_3f">It's somewhat helpful to know that we've modified
       <filename>hello.c</filename>, but we might prefer to know
       exactly <emphasis>what</emphasis> changes we've made to it.  To
       do this, we use the <command role="hg-cmd">hg diff</command>
 
     &interaction.tour.diff;
 
+    <tip>
+      <title>Understanding patches</title>
+
+      <para>Remember to take a look at <xref
+	  linkend="sec:mq:patch"/> if you don't know how to read
+	output above.</para>
+    </tip>
   </sect1>
   <sect1>
     <title>Recording changes in a new changeset</title>
 	    configuration settings.  The initial contents of your
 	    <filename role="special">.hgrc</filename> should look like
 	    this.</para>
+
+	<remark>Figure out what the appropriate directory is on
+	  Windows.</remark>
+
 	<programlisting># This is a Mercurial configuration file.
 [ui]
-username = Firstname Lastname
-&lt;email.address@domain.net&gt;</programlisting>
+username = Firstname Lastname &lt;email.address@domain.net&gt;</programlisting>
 
 	<para id="x_4b">The <quote><literal>[ui]</literal></quote> line begins a
 	  <emphasis>section</emphasis> of the config file, so you can
 
 	<para id="x_4c">You can use any text you like as the value of
 	    the <literal>username</literal> config item, since this
-	    information is for reading by other people, but for
-	    interpreting by Mercurial.  The convention that most
+	    information is for reading by other people, but will not be
+	    interpreted by Mercurial.  The convention that most
 	    people follow is to use their name and email address, as
 	    in the example above.</para>
 	<note>
 
       <para id="x_4f">The editor that the <command role="hg-cmd">hg
 	    commit</command> command drops us into will contain an
-	  empty line, followed by a number of lines starting with
+	  empty line or two, followed by a number of lines starting with
 	  <quote><literal>HG:</literal></quote>.</para>
 
-    <programlisting>XXX fix this XXX</programlisting>
+    <programlisting>
+This is where I type my commit comment.
+
+HG: Enter commit message.  Lines beginning with 'HG:' are removed.
+HG: --
+HG: user: Bryan O'Sullivan &lt;bos@serpentine.com&gt;
+HG: branch 'default'
+HG: changed hello.c</programlisting>
 
       <para id="x_50">Mercurial ignores the lines that start with
 	  <quote><literal>HG:</literal></quote>; it uses them only to
 
       &interaction.tour.tip;
 
-      <para id="x_57">We refer to
-	  the newest revision in the repository as the tip revision,
-	  or simply the tip.</para>
+      <para id="x_57">We refer to the newest revision in the
+	repository as the <emphasis>tip revision</emphasis>, or simply
+	the <emphasis>tip</emphasis>.</para>
+
+      <para>By the way, the <command role="hg-cmd">hg tip</command>
+	command accepts many of the same options as <command
+	  role="hg-cmd">hg log</command>, so <option
+	  role="hg-opt-global">-v</option> above indicates <quote>be
+	  verbose</quote>, <option role="hg-opt-tip">-p</option>
+	specifies <quote>print a patch</quote>.  The use of <option
+	  role="hg-opt-tip">-p</option> to print patches is another
+	example of the consistent naming we mentioned earlier.</para>
     </sect2>
   </sect1>
 
 
       &interaction.tour.incoming;
 
-      <para id="x_5b">(Of course, someone could
-	  cause more changesets to appear in the repository that we
-	  ran <command role="hg-cmd">hg incoming</command> in, before
-	  we get a chance to <command role="hg-cmd">hg pull</command>
-	  the changes, so that we could end up pulling changes that we
-	  didn't expect.)</para>
+      <para id="x_5b">Suppose you're pulling changes from a repository
+      on the network somewhere. While you are looking at the <command
+	  role="hg-cmd">hg incoming</command> output, and before you
+	pull those changes, someone might have committed something in
+	the remote repository. This means that it's possible to pull
+	more changes than you saw when using <command
+	  role="hg-cmd">hg incoming</command>.</para>
 
       <para id="x_5c">Bringing changes into a repository is a simple
 	  matter of running the <command role="hg-cmd">hg
 	can use <command role="hg-cmd">hg update</command> to update
 	the working directory to the state it was in at <emphasis>any
 	  revision</emphasis> in the history of the repository.  If
-	you had the working directory updated to an old revision---to
-	hunt down the origin of a bug, say---and ran a <command
+	you had the working directory updated to an old revision&emdash;to
+	hunt down the origin of a bug, say&emdash;and ran a <command
 	  role="hg-cmd">hg pull</command> which automatically updated
 	the working directory to a new revision, you might not be
 	terribly happy.</para>
 
       &interaction.tour.push;
 
-      <para id="x_69">As with
-	  <command role="hg-cmd">hg pull</command>, the <command
-	    role="hg-cmd">hg push</command> command does not update
-	  the working directory in the repository that it's pushing
-	  changes into. (Unlike <command role="hg-cmd">hg
-	    pull</command>, <command role="hg-cmd">hg push</command>
-	  does not provide a <literal>-u</literal> option that updates
-	  the other repository's working directory.)</para>
+      <para id="x_69">As with <command role="hg-cmd">hg
+	  pull</command>, the <command role="hg-cmd">hg push</command>
+	command does not update the working directory in the
+	repository that it's pushing changes into. Unlike <command
+	  role="hg-cmd">hg pull</command>, <command role="hg-cmd">hg
+	  push</command> does not provide a <literal>-u</literal>
+	option that updates the other repository's working directory.
+	This asymmetry is deliberate: the repository we're pushing to
+	might be on a remote server and shared between several people.
+	If we were to update its working directory while someone was
+	working in it, their work would be disrupted.</para>
 
       <para id="x_6a">What happens if we try to pull or push changes
 	  and the receiving repository already has those changes?

en/examples/auto-snippets.xml

 <!ENTITY interaction.tour-merge-conflict.pull SYSTEM "results/tour-merge-conflict.pull.lxo">
 <!ENTITY interaction.tour-merge-conflict.son SYSTEM "results/tour-merge-conflict.son.lxo">
 <!ENTITY interaction.tour-merge-conflict.wife SYSTEM "results/tour-merge-conflict.wife.lxo">
+<!ENTITY interaction.tour.cat1 SYSTEM "results/tour.cat1.lxo">
+<!ENTITY interaction.tour.cat2 SYSTEM "results/tour.cat2.lxo">
 <!ENTITY interaction.tour.clone SYSTEM "results/tour.clone.lxo">
 <!ENTITY interaction.tour.clone-pull SYSTEM "results/tour.clone-pull.lxo">
 <!ENTITY interaction.tour.clone-push SYSTEM "results/tour.clone-push.lxo">

en/examples/run-example

         s = open(self.name).read().rstrip()
         s = s.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;')
         ofp = wopen(result_name(self.name + '.tmp'))
+        ofp.write('<!-- BEGIN %s -->\n' % self.name)
         ofp.write('<programlisting>')
         ofp.write(s)
         ofp.write('</programlisting>\n')
+        ofp.write('<!-- END %s -->\n' % self.name)
         ofp.close()
         self.rename_output(self.name)
         norm = self.name.replace(os.sep, '-')
                             assert os.sep not in out
                             if ofp is not None:
                                 ofp.write('</screen>\n')
+                                ofp.write('<!-- END %s -->\n' % ofp_basename)
                                 ofp.close()
                                 err |= self.rename_output(ofp_basename, ignore)
                             if out:
                                     % (norm, norm)] = 1
                                 read_hint = ofp_basename + ' '
                                 ofp = wopen(result_name(ofp_basename + '.tmp'))
+                                ofp.write('<!-- BEGIN %s -->\n' % ofp_basename)
                                 ofp.write('<screen>')
                             else:
                                 ofp = None
                         # first, print the command we ran
                         if not hunk.startswith('#'):
                             nl = hunk.endswith('\n')
-                            hunk = ('<prompt>%s</prompt> <userinput>%s</userinput>' %
+                            hunk = ('<prompt>%s</prompt> '
+                                    '<userinput>%s</userinput>' %
                                     (prompts[ps],
                                      xml_escape(hunk.rstrip('\n'))))
                             if nl: hunk += '\n'
                     if ofp is not None:
                         ofp.write(output)
                         ofp.write('</screen>\n')
+                        ofp.write('<!-- END %s -->\n' % ofp_basename)
                         ofp.close()
                         err |= self.rename_output(ofp_basename, ignore)
                     os.close(self.cfd)
     print >> sys.stderr, 'Options:'
     print >> sys.stderr, '  -a --all       run all examples in this directory'
     print >> sys.stderr, '  -h --help      print this help message'
-    print >> sys.stderr, '     --help      keep new output as desired output'
+    print >> sys.stderr, '     --keep      keep new output as desired output'
     print >> sys.stderr, '  -v --verbose   display extra debug output'
     sys.exit(exit)
 
 hg clone hello my-hello
 cd my-hello
 
-#$ name: sed
+#$ name: cat1
+cat hello.c
+
+#$ name:
 
 sed -i '/printf/a\\tprintf("hello again!\\n");' hello.c
 
+#$ name: cat2
+# ... edit edit edit ...
+cat hello.c
+
 #$ name: status
 
 ls
 msgid ""
 msgstr ""
 "Project-Id-Version: hgbook 1.2\n"
-"POT-Creation-Date: 2009-03-31 10:46+0800\n"
+"POT-Creation-Date: 2009-04-02 09:21+0800\n"
 "PO-Revision-Date: 2009-03-31 10:12+0800\n"
 "Last-Translator: \n"
 "Language-Team: Simplified Chinese <i18n-zh@googlegroups.com >\n"
 msgid "Compiled from $rev_id$"
 msgstr "编译自 $rev_id$"
 
+#. type: Content of: <book><bookinfo>
+#: ../en/00book.xml:48
+msgid "<edition>1</edition> <isbn>9780596800673</isbn>"
+msgstr ""
+
 #. type: Content of: <book><bookinfo><authorgroup><author><firstname>
-#: ../en/00book.xml:50
+#: ../en/00book.xml:52
 msgid "Bryan"
 msgstr "Bryan"
 
 #. type: Content of: <book><bookinfo><authorgroup><author><surname>
-#: ../en/00book.xml:51
+#: ../en/00book.xml:53
 msgid "O'Sullivan"
 msgstr "O'Sullivan"
 
 #. type: Content of: <book><bookinfo>
-#: ../en/00book.xml:55
+#: ../en/00book.xml:57
 msgid ""
 "<editor> <firstname>Mike</firstname> <surname>Loukides</surname> </editor> "
 "<copyright> <year>2006</year> <year>2007</year> <year>2008</year> <year>2009</"
 
 #. type: Content of: <book><appendix><sect1><sect2><title>
 #: ../en/appB-mq-ref.xml:14
+#, fuzzy
 msgid "<command role=\"hg-ext-mq\">qapplied</command>—print applied patches"
 msgstr "<command role=\"hg-ext-mq\">qapplied</command>—显示已应用的补丁"
 
 
 #. type: Content of: <book><appendix><sect1><sect2><title>
 #: ../en/appB-mq-ref.xml:24
+#, fuzzy
 msgid ""
 "<command role=\"hg-ext-mq\">qcommit</command>—commit changes in the queue "
 "repository"
 
 #. type: Content of: <book><appendix><sect1><sect2><title>
 #: ../en/appB-mq-ref.xml:43
+#, fuzzy
 msgid ""
 "<command role=\"hg-ext-mq\">qdelete</command>—delete a patch from the "
 "<filename role=\"special\">series</filename> file"
 
 #. type: Content of: <book><appendix><sect1><sect2><title>
 #: ../en/appB-mq-ref.xml:66
+#, fuzzy
 msgid ""
 "<command role=\"hg-ext-mq\">qdiff</command>—print a diff of the topmost "
 "applied patch"
 
 #. type: Content of: <book><appendix><sect1><sect2><title>
 #: ../en/appB-mq-ref.xml:75
+#, fuzzy
 msgid ""
 "<command role=\"hg-ext-mq\">qfold</command>—merge (<quote>fold</quote>) "
 "several patches into one"
 
 #. type: Content of: <book><appendix><sect1><sect2><title>
 #: ../en/appB-mq-ref.xml:119
+#, fuzzy
 msgid ""
 "<command role=\"hg-ext-mq\">qheader</command>—display the header/description "
 "of a patch"
 
 #. type: Content of: <book><appendix><sect1><sect2><title>
 #: ../en/appB-mq-ref.xml:130
+#, fuzzy
 msgid ""
 "<command role=\"hg-ext-mq\">qimport</command>—import a third-party patch into "
 "the queue"
 
 #. type: Content of: <book><appendix><sect1><sect2><title>
 #: ../en/appB-mq-ref.xml:149
+#, fuzzy
 msgid ""
 "<command role=\"hg-ext-mq\">qinit</command>—prepare a repository to work with "
 "MQ"
 
 #. type: Content of: <book><appendix><sect1><sect2><title>
 #: ../en/appB-mq-ref.xml:178
+#, fuzzy
 msgid "<command role=\"hg-ext-mq\">qnew</command>—create a new patch"
 msgstr "<command role=\"hg-ext-mq\">qnew</command>—创建新补丁"
 
 
 #. type: Content of: <book><appendix><sect1><sect2><title>
 #: ../en/appB-mq-ref.xml:215
+#, fuzzy
 msgid ""
 "<command role=\"hg-ext-mq\">qnext</command>—print the name of the next patch"
 msgstr "<command role=\"hg-ext-mq\">qnext</command>—显示下个补丁的名称"
 
 #. type: Content of: <book><appendix><sect1><sect2><title>
 #: ../en/appB-mq-ref.xml:227
+#, fuzzy
 msgid "<command role=\"hg-ext-mq\">qpop</command>—pop patches off the stack"
 msgstr "<command role=\"hg-ext-mq\">qpop</command>—删除堆栈顶部的补丁"
 
 
 #. type: Content of: <book><appendix><sect1><sect2><title>
 #: ../en/appB-mq-ref.xml:288
+#, fuzzy
 msgid ""
 "<command role=\"hg-ext-mq\">qprev</command>—print the name of the previous "
 "patch"
 
 #. type: Content of: <book><appendix><sect1><sect2><title>
 #: ../en/appB-mq-ref.xml:300
+#, fuzzy
 msgid "<command role=\"hg-ext-mq\">qpush</command>—push patches onto the stack"
 msgstr "<command role=\"hg-ext-mq\">qpush</command>—增加补丁到堆栈"
 
 
 #. type: Content of: <book><appendix><sect1><sect2><title>
 #: ../en/appB-mq-ref.xml:368
+#, fuzzy
 msgid ""
 "<command role=\"hg-ext-mq\">qrefresh</command>—update the topmost applied "
 "patch"
 
 #. type: Content of: <book><appendix><sect1><sect2><title>
 #: ../en/appB-mq-ref.xml:424
+#, fuzzy
 msgid "<command role=\"hg-ext-mq\">qrename</command>—rename a patch"
 msgstr "<command role=\"hg-ext-mq\">qrename</command>—改名补丁"
 
 
 #. type: Content of: <book><appendix><sect1><sect2><title>
 #: ../en/appB-mq-ref.xml:438
+#, fuzzy
 msgid "<command role=\"hg-ext-mq\">qrestore</command>—restore saved queue state"
 msgstr "<command role=\"hg-ext-mq\">qrestore</command>—恢复保存的队列"
 
 
 #. type: Content of: <book><appendix><sect1><sect2><title>
 #: ../en/appB-mq-ref.xml:446
+#, fuzzy
 msgid "<command role=\"hg-ext-mq\">qsave</command>—save current queue state"
 msgstr "<command role=\"hg-ext-mq\">qsave</command>—保存当前的队列状态"
 
 
 #. type: Content of: <book><appendix><sect1><sect2><title>
 #: ../en/appB-mq-ref.xml:453
+#, fuzzy
 msgid ""
 "<command role=\"hg-ext-mq\">qseries</command>—print the entire patch series"
 msgstr "<command role=\"hg-ext-mq\">qseries</command>—显示补丁序列"
 
 #. type: Content of: <book><appendix><sect1><sect2><title>
 #: ../en/appB-mq-ref.xml:464
+#, fuzzy
 msgid ""
 "<command role=\"hg-ext-mq\">qtop</command>—print the name of the current patch"
 msgstr "<command role=\"hg-ext-mq\">qtop</command>—显示当前补丁的名称"
 
 #. type: Content of: <book><appendix><sect1><sect2><title>
 #: ../en/appB-mq-ref.xml:472
+#, fuzzy
 msgid ""
 "<command role=\"hg-ext-mq\">qunapplied</command>—print patches not yet applied"
 msgstr "<command role=\"hg-ext-mq\">qunapplied</command>—显示尚未应用的补丁"
 
 #. type: Content of: <book><appendix><sect1><sect2><title>
 #: ../en/appB-mq-ref.xml:484
+#, fuzzy
 msgid ""
 "<command role=\"hg-cmd\">hg strip</command>—remove a revision and descendants"
 msgstr "<command role=\"hg-cmd\">hg strip</command>—删除一个版本及其后继"
 #. type: Content of: <book><preface><sect1><sect2><para>
 #: ../en/ch00-preface.xml:71
 msgid ""
-"Most of these reasons are equally valid---at least in theory---whether you're "
-"working on a project by yourself, or with a hundred other people."
+"Most of these reasons are equally valid—at least in theory&emdash;whether "
+"you're working on a project by yourself, or with a hundred other people."
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><para>
-#: ../en/ch00-preface.xml:75
+#: ../en/ch00-preface.xml:76
 msgid ""
 "A key question about the practicality of revision control at these two "
 "different scales (<quote>lone hacker</quote> and <quote>huge team</quote>) is "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><para>
-#: ../en/ch00-preface.xml:83
+#: ../en/ch00-preface.xml:84
 msgid ""
 "A five-hundred-person project is likely to collapse under its own weight "
 "almost immediately without a revision control tool and process. In this case, "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><para>
-#: ../en/ch00-preface.xml:90
+#: ../en/ch00-preface.xml:91
 msgid ""
 "On the other hand, a one-person <quote>quick hack</quote> might seem like a "
 "poor place to use a revision control tool, because surely the cost of using "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><para>
-#: ../en/ch00-preface.xml:95
+#: ../en/ch00-preface.xml:96
 msgid ""
 "Mercurial uniquely supports <emphasis>both</emphasis> of these scales of "
 "development.  You can learn the basics in just a few minutes, and due to its "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><para>
-#: ../en/ch00-preface.xml:105
+#: ../en/ch00-preface.xml:106
 msgid ""
 "No revision control tool can rescue a poorly run project, but a good choice "
 "of tools can make a huge difference to the fluidity with which you can work "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><title>
-#: ../en/ch00-preface.xml:112
+#: ../en/ch00-preface.xml:113
 msgid "The many names of revision control"
 msgstr "版本控制的别名"
 
 #. type: Content of: <book><preface><sect1><sect2><para>
-#: ../en/ch00-preface.xml:114
+#: ../en/ch00-preface.xml:115
 msgid ""
 "Revision control is a diverse field, so much so that it is referred to by "
 "many names and acronyms.  Here are a few of the more common variations you'll "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><itemizedlist><listitem><para>
-#: ../en/ch00-preface.xml:118
+#: ../en/ch00-preface.xml:119
 msgid "Revision control (RCS)"
 msgstr "版本控制(RCS)"
 
 #. type: Content of: <book><preface><sect1><sect2><itemizedlist><listitem><para>
-#: ../en/ch00-preface.xml:119
+#: ../en/ch00-preface.xml:120
 msgid "Software configuration management (SCM), or configuration management"
 msgstr "软件配置管理(SCM),或配置管理"
 
 #. type: Content of: <book><preface><sect1><sect2><itemizedlist><listitem><para>
-#: ../en/ch00-preface.xml:121
+#: ../en/ch00-preface.xml:122
 msgid "Source code management"
 msgstr "源代码管理"
 
 #. type: Content of: <book><preface><sect1><sect2><itemizedlist><listitem><para>
-#: ../en/ch00-preface.xml:122
+#: ../en/ch00-preface.xml:123
 msgid "Source code control, or source control"
 msgstr "源代码控制,或源控制"
 
 #. type: Content of: <book><preface><sect1><sect2><itemizedlist><listitem><para>
-#: ../en/ch00-preface.xml:124
+#: ../en/ch00-preface.xml:125
 msgid "Version control (VCS)"
 msgstr "版本控制(VCS)"
 
 #. type: Content of: <book><preface><sect1><sect2><para>
-#: ../en/ch00-preface.xml:126
+#: ../en/ch00-preface.xml:127
 msgid ""
 "Some people claim that these terms actually have different meanings, but in "
 "practice they overlap so much that there's no agreed or even useful way to "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><title>
-#: ../en/ch00-preface.xml:134
+#: ../en/ch00-preface.xml:135
 msgid "This book is a work in progress"
 msgstr "本书正在编写中"
 
 #. type: Content of: <book><preface><sect1><para>
-#: ../en/ch00-preface.xml:136
+#: ../en/ch00-preface.xml:137
 msgid ""
 "I am releasing this book while I am still writing it, in the hope that it "
 "will prove useful to others.  I am writing under an open license in the hope "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><title>
-#: ../en/ch00-preface.xml:143
+#: ../en/ch00-preface.xml:144
 msgid "About the examples in this book"
 msgstr "本书的例子"
 
 #. type: Content of: <book><preface><sect1><para>
-#: ../en/ch00-preface.xml:145
+#: ../en/ch00-preface.xml:146
 msgid ""
 "This book takes an unusual approach to code samples.  Every example is "
-"<quote>live</quote>---each one is actually the result of a shell script that "
+"<quote>live</quote>each one is actually the result of a shell script that "
 "executes the Mercurial commands you see.  Every time an image of the book is "
 "built from its sources, all the example scripts are automatically run, and "
 "their current results compared against their expected results."
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><para>
-#: ../en/ch00-preface.xml:152
+#: ../en/ch00-preface.xml:153
 msgid ""
 "The advantage of this approach is that the examples are always accurate; they "
 "describe <emphasis>exactly</emphasis> the behaviour of the version of "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><para>
-#: ../en/ch00-preface.xml:159
+#: ../en/ch00-preface.xml:160
 msgid ""
 "There is a small disadvantage to this approach, which is that the dates and "
 "times you'll see in examples tend to be <quote>squashed</quote> together in a "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><para>
-#: ../en/ch00-preface.xml:167
+#: ../en/ch00-preface.xml:168
 msgid ""
 "As an instance of this, several consecutive commits in an example can show up "
 "as having occurred during the same second.  You can see this occur in the "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><para>
-#: ../en/ch00-preface.xml:173
+#: ../en/ch00-preface.xml:174
 msgid ""
 "So when you're reading examples, don't place too much weight on the dates or "
 "times you see in the output of commands.  But <emphasis>do</emphasis> be "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><title>
-#: ../en/ch00-preface.xml:181
+#: ../en/ch00-preface.xml:182
 msgid "Trends in the field"
 msgstr "版本控制的发展趋势"
 
 #. type: Content of: <book><preface><sect1><para>
-#: ../en/ch00-preface.xml:183
+#: ../en/ch00-preface.xml:184
 msgid ""
 "There has been an unmistakable trend in the development and use of revision "
 "control tools over the past four decades, as people have become familiar with "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><para>
-#: ../en/ch00-preface.xml:188
+#: ../en/ch00-preface.xml:189
 msgid ""
 "The first generation began by managing single files on individual computers.  "
 "Although these tools represented a huge advance over ad-hoc manual revision "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><para>
-#: ../en/ch00-preface.xml:194
+#: ../en/ch00-preface.xml:195
 msgid ""
 "The second generation loosened these constraints by moving to network-"
 "centered architectures, and managing entire projects at a time.  As projects "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><para>
-#: ../en/ch00-preface.xml:206
+#: ../en/ch00-preface.xml:207
 msgid ""
 "The current generation of revision control tools is peer-to-peer in nature.  "
 "All of these systems have dropped the dependency on a single central server, "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><title>
-#: ../en/ch00-preface.xml:218
+#: ../en/ch00-preface.xml:219
 msgid "A few of the advantages of distributed revision control"
 msgstr "分布版本控制的优点"
 
 #. type: Content of: <book><preface><sect1><para>
-#: ../en/ch00-preface.xml:221
+#: ../en/ch00-preface.xml:222
 msgid ""
 "Even though distributed revision control tools have for several years been as "
 "robust and usable as their previous-generation counterparts, people using "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><para>
-#: ../en/ch00-preface.xml:228
+#: ../en/ch00-preface.xml:229
 msgid ""
 "For an individual developer, distributed tools are almost always much faster "
 "than centralised tools.  This is for a simple reason: a centralised tool "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><para>
-#: ../en/ch00-preface.xml:239
+#: ../en/ch00-preface.xml:240
 msgid ""
 "Distributed tools are indifferent to the vagaries of your server "
 "infrastructure, again because they replicate metadata to so many locations.  "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><para>
-#: ../en/ch00-preface.xml:247
+#: ../en/ch00-preface.xml:248
 msgid ""
 "The reliability of your network will affect distributed tools far less than "
 "it will centralised tools.  You can't even use a centralised tool without a "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><title>
-#: ../en/ch00-preface.xml:258
+#: ../en/ch00-preface.xml:259
 msgid "Advantages for open source projects"
 msgstr "开源项目的优点"
 
 #. type: Content of: <book><preface><sect1><sect2><para>
-#: ../en/ch00-preface.xml:260
+#: ../en/ch00-preface.xml:261
 msgid ""
 "If you take a shine to an open source project and decide that you would like "
 "to start hacking on it, and that project uses a distributed revision control "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><sect3><title>
-#: ../en/ch00-preface.xml:276
+#: ../en/ch00-preface.xml:277
 msgid "The forking non-problem"
 msgstr "分叉不是问题"
 
 #. type: Content of: <book><preface><sect1><sect2><sect3><para>
-#: ../en/ch00-preface.xml:278
+#: ../en/ch00-preface.xml:279
 msgid ""
 "It has been suggested that distributed revision control tools pose some sort "
 "of risk to open source projects because they make it easy to <quote>fork</"
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><sect3><para>
-#: ../en/ch00-preface.xml:288
+#: ../en/ch00-preface.xml:289
 msgid ""
 "Sometimes the camps in a fork decide to reconcile their differences. With a "
 "centralised revision control system, the <emphasis>technical</emphasis> "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><sect3><para>
-#: ../en/ch00-preface.xml:297
+#: ../en/ch00-preface.xml:298
 msgid ""
 "What distributed tools do with respect to forking is they make forking the "
 "<emphasis>only</emphasis> way to develop a project.  Every single change that "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><sect3><para>
-#: ../en/ch00-preface.xml:306
+#: ../en/ch00-preface.xml:307
 msgid ""
 "If every piece of work that everybody does, all the time, is framed in terms "
 "of forking and merging, then what the open source world refers to as a "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><sect3><itemizedlist><listitem><para>
-#: ../en/ch00-preface.xml:313
+#: ../en/ch00-preface.xml:314
 msgid ""
 "They eliminate the social distinction that centralised tools impose: that "
 "between insiders (people with commit access) and outsiders (people without)."
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><sect3><itemizedlist><listitem><para>
-#: ../en/ch00-preface.xml:317
+#: ../en/ch00-preface.xml:318
 msgid ""
 "They make it easier to reconcile after a social fork, because all that's "
 "involved from the perspective of the revision control software is just "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><sect3><para>
-#: ../en/ch00-preface.xml:322
+#: ../en/ch00-preface.xml:323
 msgid ""
 "Some people resist distributed tools because they want to retain tight "
 "control over their projects, and they believe that centralised tools give "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><title>
-#: ../en/ch00-preface.xml:337
+#: ../en/ch00-preface.xml:338
 msgid "Advantages for commercial projects"
 msgstr "商业项目的优点"
 
 #. type: Content of: <book><preface><sect1><sect2><para>
-#: ../en/ch00-preface.xml:339
+#: ../en/ch00-preface.xml:340
 msgid ""
 "Many commercial projects are undertaken by teams that are scattered across "
 "the globe.  Contributors who are far from a central server will see slower "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><para>
-#: ../en/ch00-preface.xml:351
+#: ../en/ch00-preface.xml:352
 msgid ""
 "Centralised revision control systems tend to have relatively low "
 "scalability.  It's not unusual for an expensive centralised system to fall "
 "over under the combined load of just a few dozen concurrent users.  Once "
 "again, the typical response tends to be an expensive and clunky replication "
-"facility.  Since the load on a central server---if you have one at all---is "
-"many times lower with a distributed tool (because all of the data is "
-"replicated everywhere), a single cheap server can handle the needs of a much "
-"larger team, and replication to balance load becomes a simple matter of "
-"scripting."
+"facility.  Since the load on a central server—if you have one at all—is many "
+"times lower with a distributed tool (because all of the data is replicated "
+"everywhere), a single cheap server can handle the needs of a much larger "
+"team, and replication to balance load becomes a simple matter of scripting."
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><para>
-#: ../en/ch00-preface.xml:363
+#: ../en/ch00-preface.xml:364
 msgid ""
 "If you have an employee in the field, troubleshooting a problem at a "
 "customer's site, they'll benefit from distributed revision control. The tool "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><title>
-#: ../en/ch00-preface.xml:374
+#: ../en/ch00-preface.xml:375
 msgid "Why choose Mercurial?"
 msgstr "为什么选择 Mercurial?"
 
 #. type: Content of: <book><preface><sect1><para>
-#: ../en/ch00-preface.xml:376
+#: ../en/ch00-preface.xml:377
 msgid ""
 "Mercurial has a unique set of properties that make it a particularly good "
 "choice as a revision control system."
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><itemizedlist><listitem><para>
-#: ../en/ch00-preface.xml:379
+#: ../en/ch00-preface.xml:380
 msgid "It is easy to learn and use."
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><itemizedlist><listitem><para>
-#: ../en/ch00-preface.xml:380
-msgid "It is lightweight."
-msgstr ""
-
-#. type: Content of: <book><preface><sect1><itemizedlist><listitem><para>
 #: ../en/ch00-preface.xml:381
-msgid "It scales excellently."
+msgid "It is lightweight."
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><itemizedlist><listitem><para>
 #: ../en/ch00-preface.xml:382
+msgid "It scales excellently."
+msgstr ""
+
+#. type: Content of: <book><preface><sect1><itemizedlist><listitem><para>
+#: ../en/ch00-preface.xml:383
 msgid "It is easy to customise."
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><para>
-#: ../en/ch00-preface.xml:385
+#: ../en/ch00-preface.xml:386
 msgid ""
 "If you are at all familiar with revision control systems, you should be able "
 "to get up and running with Mercurial in less than five minutes.  Even if not, "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><para>
-#: ../en/ch00-preface.xml:392
+#: ../en/ch00-preface.xml:393
 msgid ""
 "On a small project, you can start working with Mercurial in moments. Creating "
 "new changes and branches; transferring changes around (whether locally or "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><para>
-#: ../en/ch00-preface.xml:399
+#: ../en/ch00-preface.xml:400
 msgid ""
 "The usefulness of Mercurial is not limited to small projects: it is used by "
 "projects with hundreds to thousands of contributors, each containing tens of "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><para>
-#: ../en/ch00-preface.xml:404
+#: ../en/ch00-preface.xml:405
 msgid ""
 "If the core functionality of Mercurial is not enough for you, it's easy to "
 "build on.  Mercurial is well suited to scripting tasks, and its clean "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><title>
-#: ../en/ch00-preface.xml:414
+#: ../en/ch00-preface.xml:415
 msgid "Mercurial compared with other tools"
 msgstr "Mercurial 与其它工具的比较"
 
 #. type: Content of: <book><preface><sect1><para>
-#: ../en/ch00-preface.xml:416
+#: ../en/ch00-preface.xml:417
 msgid ""
 "Before you read on, please understand that this section necessarily reflects "
 "my own experiences, interests, and (dare I say it) biases.  I have used every "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><itemizedlist><listitem><para>
-#: ../en/ch00-preface.xml:424 ../en/ch00-preface.xml:635
+#: ../en/ch00-preface.xml:425 ../en/ch00-preface.xml:636
 msgid "Subversion"
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><para>
-#: ../en/ch00-preface.xml:426
+#: ../en/ch00-preface.xml:427
 msgid ""
 "Subversion is a popular revision control tool, developed to replace CVS.  It "
 "has a centralised client/server architecture."
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><para>
-#: ../en/ch00-preface.xml:430
+#: ../en/ch00-preface.xml:431
 msgid ""
 "Subversion and Mercurial have similarly named commands for performing the "
 "same operations, so if you're familiar with one, it is easy to learn to use "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><para>
-#: ../en/ch00-preface.xml:435
+#: ../en/ch00-preface.xml:436
 msgid ""
 "Prior to version 1.5, Subversion had no useful support for merges. At the "
 "time of writing, its merge tracking capability is new, and known to be <ulink "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><para>
-#: ../en/ch00-preface.xml:441
+#: ../en/ch00-preface.xml:442
 msgid ""
 "Mercurial has a substantial performance advantage over Subversion on every "
 "revision control operation I have benchmarked.  I have measured its advantage "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><para>
-#: ../en/ch00-preface.xml:454
+#: ../en/ch00-preface.xml:455
 msgid ""
 "Additionally, Subversion incurs substantial storage overhead to avoid network "
 "transactions for a few common operations, such as finding modified files "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><para>
-#: ../en/ch00-preface.xml:464
+#: ../en/ch00-preface.xml:465
 msgid ""
 "Subversion is widely supported by third party tools.  Mercurial currently "
 "lags considerably in this area.  This gap is closing, however, and indeed "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><para>
-#: ../en/ch00-preface.xml:470
+#: ../en/ch00-preface.xml:471
 msgid ""
 "Because Subversion doesn't store revision history on the client, it is well "
 "suited to managing projects that deal with lots of large, opaque binary "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><para>
-#: ../en/ch00-preface.xml:479
+#: ../en/ch00-preface.xml:480
 msgid ""
 "In addition, it's often difficult or, more usually, impossible to merge "
 "different versions of a binary file.  Subversion's ability to let a user lock "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><para>
-#: ../en/ch00-preface.xml:486
+#: ../en/ch00-preface.xml:487
 msgid ""
 "Mercurial can import revision history from a Subversion repository. It can "
 "also export revision history to a Subversion repository.  This makes it easy "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><itemizedlist><listitem><para>
-#: ../en/ch00-preface.xml:498 ../en/ch00-preface.xml:637
+#: ../en/ch00-preface.xml:499 ../en/ch00-preface.xml:638
 msgid "Git"
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><para>
-#: ../en/ch00-preface.xml:500
+#: ../en/ch00-preface.xml:501
 msgid ""
 "Git is a distributed revision control tool that was developed for managing "
 "the Linux kernel source tree.  Like Mercurial, its early design was somewhat "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><para>
-#: ../en/ch00-preface.xml:505
+#: ../en/ch00-preface.xml:506
 msgid ""
 "Git has a very large command set, with version 1.5.0 providing 139 individual "
 "commands.  It has something of a reputation for being difficult to learn.  "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><para>
-#: ../en/ch00-preface.xml:510
+#: ../en/ch00-preface.xml:511
 msgid ""
 "In terms of performance, Git is extremely fast.  In several cases, it is "
 "faster than Mercurial, at least on Linux, while Mercurial performs better on "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><para>
-#: ../en/ch00-preface.xml:517
+#: ../en/ch00-preface.xml:518
 msgid ""
 "While a Mercurial repository needs no maintenance, a Git repository requires "
 "frequent manual <quote>repacks</quote> of its metadata.  Without these, "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><para>
-#: ../en/ch00-preface.xml:528
+#: ../en/ch00-preface.xml:529
 msgid ""
 "The core of Git is written in C.  Many Git commands are implemented as shell "
 "or Perl scripts, and the quality of these scripts varies widely. I have "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><para>
-#: ../en/ch00-preface.xml:534
+#: ../en/ch00-preface.xml:535
 msgid "Mercurial can import revision history from a Git repository."
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><itemizedlist><listitem><para>
-#: ../en/ch00-preface.xml:540 ../en/ch00-preface.xml:636
+#: ../en/ch00-preface.xml:541 ../en/ch00-preface.xml:637
 msgid "CVS"
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><para>
-#: ../en/ch00-preface.xml:542
+#: ../en/ch00-preface.xml:543
 msgid ""
 "CVS is probably the most widely used revision control tool in the world.  Due "
 "to its age and internal untidiness, it has been only lightly maintained for "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><para>
-#: ../en/ch00-preface.xml:546
+#: ../en/ch00-preface.xml:547
 msgid ""
 "It has a centralised client/server architecture.  It does not group related "
 "file changes into atomic commits, making it easy for people to <quote>break "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><para>
-#: ../en/ch00-preface.xml:558
+#: ../en/ch00-preface.xml:559
 msgid ""
 "CVS has a muddled notion of tags and branches that I will not attempt to even "
 "describe.  It does not support renaming of files or directories well, making "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><para>
-#: ../en/ch00-preface.xml:566
+#: ../en/ch00-preface.xml:567
 msgid ""
 "Mercurial can import CVS revision history.  However, there are a few caveats "
 "that apply; these are true of every other revision control tool's CVS "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><para>
-#: ../en/ch00-preface.xml:580
+#: ../en/ch00-preface.xml:581
 msgid "Mercurial can import revision history from a CVS repository."
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><title>
-#: ../en/ch00-preface.xml:586
+#: ../en/ch00-preface.xml:587
 msgid "Commercial tools"
 msgstr "商业工具"
 
 #. type: Content of: <book><preface><sect1><sect2><para>
-#: ../en/ch00-preface.xml:588
+#: ../en/ch00-preface.xml:589
 msgid ""
 "Perforce has a centralised client/server architecture, with no client-side "
 "caching of any data.  Unlike modern revision control tools, Perforce requires "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><para>
-#: ../en/ch00-preface.xml:594
+#: ../en/ch00-preface.xml:595
 msgid ""
 "The performance of Perforce is quite good for small teams, but it falls off "
 "rapidly as the number of users grows beyond a few dozen. Modestly large "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><title>
-#: ../en/ch00-preface.xml:603
+#: ../en/ch00-preface.xml:604
 msgid "Choosing a revision control tool"
 msgstr "选择版本控制工具"
 
 #. type: Content of: <book><preface><sect1><sect2><para>
-#: ../en/ch00-preface.xml:605
+#: ../en/ch00-preface.xml:606
 msgid ""
 "With the exception of CVS, all of the tools listed above have unique "
 "strengths that suit them to particular styles of work.  There is no single "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><para>
-#: ../en/ch00-preface.xml:610
+#: ../en/ch00-preface.xml:611
 msgid ""
 "As an example, Subversion is a good choice for working with frequently edited "
 "binary files, due to its centralised nature and support for file locking."
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><sect2><para>
-#: ../en/ch00-preface.xml:614
+#: ../en/ch00-preface.xml:615
 msgid ""
 "I personally find Mercurial's properties of simplicity, performance, and good "
 "merge support to be a compelling combination that has served me well for "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><title>
-#: ../en/ch00-preface.xml:622
+#: ../en/ch00-preface.xml:623
 msgid "Switching from another tool to Mercurial"
 msgstr "从其它工具切换到 Mercurial"
 
 #. type: Content of: <book><preface><sect1><para>
-#: ../en/ch00-preface.xml:624
+#: ../en/ch00-preface.xml:625
 msgid ""
 "Mercurial is bundled with an extension named <literal role=\"hg-ext"
 "\">convert</literal>, which can incrementally import revision history from "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><para>
-#: ../en/ch00-preface.xml:632
+#: ../en/ch00-preface.xml:633
 msgid ""
 "The revision control tools supported by <literal role=\"hg-ext\">convert</"
 "literal> are as follows:"
 msgstr "<literal role=\"hg-ext\">convert</literal> 支持的版本控制工具有:"
 
 #. type: Content of: <book><preface><sect1><itemizedlist><listitem><para>
-#: ../en/ch00-preface.xml:638
+#: ../en/ch00-preface.xml:639
 msgid "Darcs"
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><para>
-#: ../en/ch00-preface.xml:640
+#: ../en/ch00-preface.xml:641
 msgid ""
 "In addition, <literal role=\"hg-ext\">convert</literal> can export changes "
 "from Mercurial to Subversion.  This makes it possible to try Subversion and "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><para>
-#: ../en/ch00-preface.xml:646
+#: ../en/ch00-preface.xml:647
 msgid ""
 "The <command role=\"hg-ext-convert\">convert</command> command is easy to "
 "use.  Simply point it at the path or URL of the source repository, optionally "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><title>
-#: ../en/ch00-preface.xml:655
+#: ../en/ch00-preface.xml:656
 msgid "A short history of revision control"
 msgstr "版本控制简史"
 
 #. type: Content of: <book><preface><sect1><para>
-#: ../en/ch00-preface.xml:657
+#: ../en/ch00-preface.xml:658
 msgid ""
 "The best known of the old-time revision control tools is SCCS (Source Code "
 "Control System), which Marc Rochkind wrote at Bell Labs, in the early 1970s.  "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><para>
-#: ../en/ch00-preface.xml:668
+#: ../en/ch00-preface.xml:669
 msgid ""
 "Walter Tichy developed a free alternative to SCCS in the early 1980s; he "
 "called his program RCS (Revision Control System).  Like SCCS, RCS required "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><para>
-#: ../en/ch00-preface.xml:674
+#: ../en/ch00-preface.xml:675
 msgid ""
 "Later in the 1980s, Dick Grune used RCS as a building block for a set of "
 "shell scripts he initially called cmt, but then renamed to CVS (Concurrent "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><para>
-#: ../en/ch00-preface.xml:685
+#: ../en/ch00-preface.xml:686
 msgid ""
 "Brian Berliner took Grune's original scripts and rewrote them in C, releasing "
 "in 1989 the code that has since developed into the modern version of CVS.  "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><para>
-#: ../en/ch00-preface.xml:696
+#: ../en/ch00-preface.xml:697
 msgid ""
 "In the early 1990s, Sun Microsystems developed an early distributed revision "
 "control system, called TeamWare.  A TeamWare workspace contains a complete "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><para>
-#: ../en/ch00-preface.xml:703
+#: ../en/ch00-preface.xml:704
 msgid ""
 "As the 1990s progressed, awareness grew of a number of problems with CVS.  It "
 "records simultaneous changes to multiple files individually, instead of "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><para>
-#: ../en/ch00-preface.xml:713
+#: ../en/ch00-preface.xml:714
 msgid ""
 "In 2001, Jim Blandy and Karl Fogel, two developers who had worked on CVS, "
 "started a project to replace it with a tool that would have a better "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><para>
-#: ../en/ch00-preface.xml:722
+#: ../en/ch00-preface.xml:723
 msgid ""
 "More or less simultaneously, Graydon Hoare began working on an ambitious "
 "distributed revision control system that he named Monotone. While Monotone "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><para>
-#: ../en/ch00-preface.xml:731
+#: ../en/ch00-preface.xml:732
 msgid ""
 "Mercurial began life in 2005.  While a few aspects of its design are "
 "influenced by Monotone, Mercurial focuses on ease of use, high performance, "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><title>
-#: ../en/ch00-preface.xml:739
+#: ../en/ch00-preface.xml:740
+#, fuzzy
 msgid "Colophon—this book is Free"
 msgstr "后记—本书是自由的!"
 
 #. type: Content of: <book><preface><sect1><para>
-#: ../en/ch00-preface.xml:741
+#: ../en/ch00-preface.xml:742
 msgid ""
 "This book is licensed under the Open Publication License, and is produced "
 "entirely using Free Software tools.  It is typeset with DocBook XML.  "
 msgstr ""
 
 #. type: Content of: <book><preface><sect1><para>
-#: ../en/ch00-preface.xml:746
+#: ../en/ch00-preface.xml:747
 msgid ""
 "The complete source code for this book is published as a Mercurial "
 "repository, at <ulink url=\"http://hg.serpentine.com/mercurial/book\">http://"
 
 #. type: Content of: <book><chapter><sect1><sect2><title>
 #: ../en/ch01-tour-basic.xml:15
+msgid "Windows"
+msgstr ""
+
+#. type: Content of: <book><chapter><sect1><sect2><para>
+#: ../en/ch01-tour-basic.xml:17
+msgid ""
+"The best version of Mercurial for Windows is TortoiseHg, which can be found "
+"at <ulink url=\"http://bitbucket.org/tortoisehg/stable/wiki/Home\">http://"
+"bitbucket.org/tortoisehg/stable/wiki/Home</ulink>.  This package has no "
+"external dependencies; it <quote>just works</quote>.  It provides both "
+"command line and graphical user interfaces."
+msgstr ""
+
+#. type: Content of: <book><chapter><sect1><sect2><title>
+#: ../en/ch01-tour-basic.xml:27
+msgid "Mac OS X"
+msgstr "Mac OS X"
+
+#. type: Content of: <book><chapter><sect1><sect2><para>
+#: ../en/ch01-tour-basic.xml:29
+msgid ""
+"Lee Cantey publishes an installer of Mercurial for Mac OS X at <ulink url="
+"\"http://mercurial.berkwood.com\">http://mercurial.berkwood.com</ulink>."
+msgstr ""
+
+#. type: Content of: <book><chapter><sect1><sect2><title>
+#: ../en/ch01-tour-basic.xml:35
 msgid "Linux"
 msgstr "Linux"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
-#: ../en/ch01-tour-basic.xml:17
+#: ../en/ch01-tour-basic.xml:37
 msgid ""
 "Because each Linux distribution has its own packaging tools, policies, and "
 "rate of development, it's difficult to give a comprehensive set of "
 "使用的发行版的 Mercurial 维护者的活跃程度。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
-#: ../en/ch01-tour-basic.xml:24
+#: ../en/ch01-tour-basic.xml:44
 msgid ""
 "To keep things simple, I will focus on installing Mercurial from the command "
 "line under the most popular Linux distributions.  Most of these distributions "
 "Mercurial;寻找的包名称是 <literal>mercurial</literal>。"
 
 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
-#: ../en/ch01-tour-basic.xml:32
-msgid "Debian:"
-msgstr "Debian:"
-
-#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
-#: ../en/ch01-tour-basic.xml:34
-msgid "Fedora Core:"
-msgstr "Fedora Core:"
-
-#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
-#: ../en/ch01-tour-basic.xml:36
+#: ../en/ch01-tour-basic.xml:52
+msgid "Ubuntu and Debian:"
+msgstr ""
+
+#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
+#: ../en/ch01-tour-basic.xml:54
+#, fuzzy
+msgid "Fedora and OpenSUSE:"
+msgstr "OpenSUSE:"
+
+#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
+#: ../en/ch01-tour-basic.xml:56
 msgid "Gentoo:"
 msgstr "Gentoo:"
 
-#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
-#: ../en/ch01-tour-basic.xml:38
-msgid "OpenSUSE:"
-msgstr "OpenSUSE:"
-
-#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
-#: ../en/ch01-tour-basic.xml:40
-msgid ""
-"Ubuntu: Ubuntu's Mercurial package is based on Debian's.  To install it, run "
-"the following command."
-msgstr "Ubuntu: Ubuntu 的 Mercurial 包基于 Debian。安装时,使用如下命令:"
-
-#. type: Content of: <book><chapter><sect1><sect2><title>
-#: ../en/ch01-tour-basic.xml:48
+#. type: Content of: <book><chapter><sect1><sect2><title>
+#: ../en/ch01-tour-basic.xml:62
 msgid "Solaris"
 msgstr "Solaris"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
-#: ../en/ch01-tour-basic.xml:50
+#: ../en/ch01-tour-basic.xml:64
+#, fuzzy
 msgid ""
 "SunFreeWare, at <ulink url=\"http://www.sunfreeware.com\">http://www."
-"sunfreeware.com</ulink>, is a good source for a large number of pre-built "
-"Solaris packages for 32 and 64 bit Intel and Sparc architectures, including "
-"current versions of Mercurial."
+"sunfreeware.com</ulink>, provides prebuilt packages of Mercurial."
 msgstr ""
 "位于 <ulink url=\"http://www.sunfreeware.com\">http://www.sunfreeware.com</"
 "ulink> 的 SunFreeWare 是很好的二进制安装源,它包含 Intel 和 Sparc 架构的 32 位"
 "和 64 位包,包含 Mercurial 的当前版本。"
 
-#. type: Content of: <book><chapter><sect1><sect2><title>
-#: ../en/ch01-tour-basic.xml:58
-msgid "Mac OS X"
-msgstr "Mac OS X"
-
-#. type: Content of: <book><chapter><sect1><sect2><para>
-#: ../en/ch01-tour-basic.xml:60
-msgid ""
-"Lee Cantey publishes an installer of Mercurial for Mac OS X at <ulink url="
-"\"http://mercurial.berkwood.com\">http://mercurial.berkwood.com</ulink>.  "
-"This package works on both Intel- and Power-based Macs. Before you can use "
-"it, you must install a compatible version of Universal MacPython "
-"<citation>web:macpython</citation>. This is easy to do; simply follow the "
-"instructions on Lee's site."
-msgstr ""
-
-#. type: Content of: <book><chapter><sect1><sect2><para>
-#: ../en/ch01-tour-basic.xml:69
-msgid ""
-"It's also possible to install Mercurial using Fink or MacPorts, two popular "
-"free package managers for Mac OS X.  If you have Fink, use <command>sudo apt-"
-"get install mercurial-py25</command>.  If MacPorts, <command>sudo port "
-"install mercurial</command>."
-msgstr ""
-
-#. type: Content of: <book><chapter><sect1><sect2><title>
-#: ../en/ch01-tour-basic.xml:77
-msgid "Windows"
-msgstr ""
-
-#. type: Content of: <book><chapter><sect1><sect2><para>
-#: ../en/ch01-tour-basic.xml:79
-msgid ""
-"Lee Cantey publishes an installer of Mercurial for Windows at <ulink url="
-"\"http://mercurial.berkwood.com\">http://mercurial.berkwood.com</ulink>.  "
-"This package has no external dependencies; it <quote>just works</quote>."
-msgstr ""
-
-#. type: Content of: <book><chapter><sect1><sect2><note><para>
-#: ../en/ch01-tour-basic.xml:86
-msgid ""
-"The Windows version of Mercurial does not automatically convert line endings "
-"between Windows and Unix styles.  If you want to share work with Unix users, "
-"you must do a little additional configuration work. XXX Flesh this out."
-msgstr ""
-
-#. type: Content of: <book><chapter><sect1><title>
-#: ../en/ch01-tour-basic.xml:96
+#. type: Content of: <book><chapter><sect1><title>
+#: ../en/ch01-tour-basic.xml:73
 msgid "Getting started"
 msgstr "开始"
 
 #. type: Content of: <book><chapter><sect1><para>
-#: ../en/ch01-tour-basic.xml:98
+#: ../en/ch01-tour-basic.xml:75
 msgid ""
 "To begin, we'll use the <command role=\"hg-cmd\">hg version</command> command "
 "to find out whether Mercurial is actually installed properly.  The actual "
 msgstr ""
 
 #. type: Content of: <book><chapter><sect1><sect2><title>
-#: ../en/ch01-tour-basic.xml:107
+#: ../en/ch01-tour-basic.xml:84
 msgid "Built-in help"
 msgstr "内置帮助"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
-#: ../en/ch01-tour-basic.xml:109
+#: ../en/ch01-tour-basic.xml:86
 msgid ""
 "Mercurial provides a built-in help system.  This is invaluable for those "
 "times when you find yourself stuck trying to remember how to run a command.  "
 msgstr ""
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
-#: ../en/ch01-tour-basic.xml:120
+#: ../en/ch01-tour-basic.xml:97
 msgid ""
 "For a more impressive level of detail (which you won't usually need) run "
 "<command role=\"hg-cmd\">hg help <option role=\"hg-opt-global\">-v</option></"
 msgstr ""
 
 #. type: Content of: <book><chapter><sect1><title>
-#: ../en/ch01-tour-basic.xml:131
+#: ../en/ch01-tour-basic.xml:108
 msgid "Working with a repository"
 msgstr "使用版本库"
 
 #. type: Content of: <book><chapter><sect1><para>
-#: ../en/ch01-tour-basic.xml:133
+#: ../en/ch01-tour-basic.xml:110
 msgid ""
 "In Mercurial, everything happens inside a <emphasis>repository</emphasis>.  "
 "The repository for a project contains all of the files that <quote>belong to</"
 msgstr ""
 
 #. type: Content of: <book><chapter><sect1><para>
-#: ../en/ch01-tour-basic.xml:139
+#: ../en/ch01-tour-basic.xml:116
 msgid ""
 "There's nothing particularly magical about a repository; it is simply a "
 "directory tree in your filesystem that Mercurial treats as special. You can "
 msgstr ""
 
 #. type: Content of: <book><chapter><sect1><sect2><title>
-#: ../en/ch01-tour-basic.xml:146
+#: ../en/ch01-tour-basic.xml:123
 msgid "Making a local copy of a repository"
 msgstr "创建版本库的工作副本"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
-#: ../en/ch01-tour-basic.xml:148
+#: ../en/ch01-tour-basic.xml:125
 msgid ""
 "<emphasis>Copying</emphasis> a repository is just a little bit special.  "
 "While you could use a normal file copying command to make a copy of a "
 "repository, it's best to use a built-in command that Mercurial provides.  "
 "This command is called <command role=\"hg-cmd\">hg clone</command>, because "
-"it creates an identical copy of an existing repository."
-msgstr ""
-
-#. type: Content of: <book><chapter><sect1><sect2><para>
-#: ../en/ch01-tour-basic.xml:157
+"it makes an identical copy of an existing repository."
+msgstr ""
+
+#. type: Content of: <book><chapter><sect1><sect2><para>
+#: ../en/ch01-tour-basic.xml:134
+msgid ""
+"One advantage of using <command role=\"hg-cmd\">hg clone</command> is that, "
+"as we can see above, it lets us clone repositories over the network.  Another "
+"is that it remembers where we cloned from, which we'll find useful soon when "
+"we want to fetch new changes from another repository."
+msgstr ""
+
+#. type: Content of: <book><chapter><sect1><sect2><para>
+#: ../en/ch01-tour-basic.xml:140
 msgid ""
 "If our clone succeeded, we should now have a local directory called <filename "
 "class=\"directory\">hello</filename>.  This directory will contain some files."
 msgstr ""
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
-#: ../en/ch01-tour-basic.xml:163
+#: ../en/ch01-tour-basic.xml:146
 msgid ""
 "These files have the same contents and history in our repository as they do "
 "in the repository we cloned."
 msgstr ""
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
-#: ../en/ch01-tour-basic.xml:166
+#: ../en/ch01-tour-basic.xml:149
 msgid ""
 "Every Mercurial repository is complete, self-contained, and independent.  It "
-"contains its own private copy of a project's files and history.  A cloned "
-"repository remembers the location of the repository it was cloned from, but "
-"it does not communicate with that repository, or any other, unless you tell "
-"it to."
-msgstr ""
-
-#. type: Content of: <book><chapter><sect1><sect2><para>
-#: ../en/ch01-tour-basic.xml:173
+"contains its own private copy of a project's files and history.  As we just "
+"mentioned, a cloned repository remembers the location of the repository it "
+"was cloned from, but Mercurial will not communicate with that repository, or "
+"any other, unless you tell it to."
+msgstr ""
+
+#. type: Content of: <book><chapter><sect1><sect2><para>
+#: ../en/ch01-tour-basic.xml:156
 msgid ""
 "What this means for now is that we're free to experiment with our repository, "
 "safe in the knowledge that it's a private <quote>sandbox</quote> that won't "
 msgstr ""
 
 #. type: Content of: <book><chapter><sect1><sect2><title>
-#: ../en/ch01-tour-basic.xml:179
+#: ../en/ch01-tour-basic.xml:162
 msgid "What's in a repository?"
 msgstr "什么是版本库?"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
-#: ../en/ch01-tour-basic.xml:181
+#: ../en/ch01-tour-basic.xml:164
 msgid ""
 "When we take a more detailed look inside a repository, we can see that it "
 "contains a directory named <filename class=\"directory\">.hg</filename>.  "
 msgstr ""
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
-#: ../en/ch01-tour-basic.xml:188
+#: ../en/ch01-tour-basic.xml:171
 msgid ""
 "The contents of the <filename class=\"directory\">.hg</filename> directory "
 "and its subdirectories are private to Mercurial.  Every other file and "
 msgstr ""
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
-#: ../en/ch01-tour-basic.xml:194
+#: ../en/ch01-tour-basic.xml:177
 msgid ""
 "To introduce a little terminology, the <filename class=\"directory\">.hg</"
 "filename> directory is the <quote>real</quote> repository, and all of the "
 msgstr ""
 
 #. type: Content of: <book><chapter><sect1><title>
-#: ../en/ch01-tour-basic.xml:209
+#: ../en/ch01-tour-basic.xml:192
 msgid "A tour through history"
 msgstr "回溯历史"
 
 #. type: Content of: <book><chapter><sect1><para>
-#: ../en/ch01-tour-basic.xml:211
+#: ../en/ch01-tour-basic.xml:194
 msgid ""
 "One of the first things we might want to do with a new, unfamiliar repository "
 "is understand its history.  The <command role=\"hg-cmd\">hg log</command> "
-"command gives us a view of history."
-msgstr ""
-
-#. type: Content of: <book><chapter><sect1><para>
-#: ../en/ch01-tour-basic.xml:218
+"command gives us a view of the history of changes in the repository."
+msgstr ""
+
+#. type: Content of: <book><chapter><sect1><para>
+#: ../en/ch01-tour-basic.xml:201
 msgid ""
 "By default, this command prints a brief paragraph of output for each change "
 "to the project that was recorded.  In Mercurial terminology, we call each of "
 msgstr ""
 
 #. type: Content of: <book><chapter><sect1><para>
-#: ../en/ch01-tour-basic.xml:224