hgbook

diff en/ch03-concepts.xml @ 620:2ff0a43f1152

Update ch03
author Bryan O'Sullivan <bos@serpentine.com>
date Mon Apr 06 23:13:53 2009 -0700 (2009-04-06)
parents 0b45854f0b7b
children e9ef075327c1
line diff
     1.1 --- a/en/ch03-concepts.xml	Thu Mar 26 22:00:53 2009 -0700
     1.2 +++ b/en/ch03-concepts.xml	Mon Apr 06 23:13:53 2009 -0700
     1.3 @@ -4,14 +4,16 @@
     1.4    <?dbhtml filename="behind-the-scenes.html"?>
     1.5    <title>Behind the scenes</title>
     1.6  
     1.7 -  <para id="x_2e8">Unlike many revision control systems, the concepts upon which
     1.8 -    Mercurial is built are simple enough that it's easy to understand
     1.9 -    how the software really works.  Knowing this certainly isn't
    1.10 -    necessary, but I find it useful to have a <quote>mental
    1.11 -      model</quote> of what's going on.</para>
    1.12 -
    1.13 -  <para id="x_2e9">This understanding gives me confidence that Mercurial has been
    1.14 -    carefully designed to be both <emphasis>safe</emphasis> and
    1.15 +  <para id="x_2e8">Unlike many revision control systems, the concepts
    1.16 +    upon which Mercurial is built are simple enough that it's easy to
    1.17 +    understand how the software really works.  Knowing these details
    1.18 +    certainly isn't necessary, so it is certainly safe to skip this
    1.19 +    chapter.  However, I think you will get more out of the software
    1.20 +    with a <quote>mental model</quote> of what's going on.</para>
    1.21 +
    1.22 +  <para id="x_2e9">Being able to understand what's going on behind the
    1.23 +    scenes gives me confidence that Mercurial has been carefully
    1.24 +    designed to be both <emphasis>safe</emphasis> and
    1.25      <emphasis>efficient</emphasis>.  And just as importantly, if it's
    1.26      easy for me to retain a good idea of what the software is doing
    1.27      when I perform a revision control task, I'm less likely to be
    1.28 @@ -436,19 +438,19 @@
    1.29  	  a new head, because your working directory isn't synced to
    1.30  	  whatever the current tip is.</para>
    1.31  
    1.32 -	<para id="x_316">  I put the word <quote>error</quote> in quotes because
    1.33 -	  all that you need to do to rectify this situation is
    1.34 -	  <command role="hg-cmd">hg merge</command>, then <command
    1.35 -	    role="hg-cmd">hg commit</command>.  In other words, this
    1.36 -	  almost never has negative consequences; it just surprises
    1.37 -	  people.  I'll discuss other ways to avoid this behaviour,
    1.38 -	  and why Mercurial behaves in this initially surprising way,
    1.39 -	  later on.</para>
    1.40 +	<para id="x_316">  I put the word <quote>error</quote> in
    1.41 +	  quotes because all that you need to do to rectify this
    1.42 +	  situation is <command role="hg-cmd">hg merge</command>, then
    1.43 +	  <command role="hg-cmd">hg commit</command>.  In other words,
    1.44 +	  this almost never has negative consequences; it's just
    1.45 +	  something of a surprise for newcomers.  I'll discuss other
    1.46 +	  ways to avoid this behaviour, and why Mercurial behaves in
    1.47 +	  this initially surprising way, later on.</para>
    1.48        </note>
    1.49  
    1.50      </sect2>
    1.51      <sect2>
    1.52 -      <title>Merging heads</title>
    1.53 +      <title>Merging changes</title>
    1.54  
    1.55        <para id="x_317">When you run the <command role="hg-cmd">hg
    1.56  	  merge</command> command, Mercurial leaves the first parent
    1.57 @@ -518,7 +520,25 @@
    1.58  	merge immediately becomes overwhelming.</para>
    1.59  
    1.60      </sect2>
    1.61 +
    1.62 +    <sect2>
    1.63 +      <title>Merging and renames</title>
    1.64 +
    1.65 +      <para>A surprising number of revision control systems pay little
    1.66 +	or no attention to a file's <emphasis>name</emphasis> over
    1.67 +	time.  For instance, it used to be common that if a file got
    1.68 +	renamed on one side of a merge, the changes from the other
    1.69 +	side would be silently dropped.</para>
    1.70 +
    1.71 +      <para>Mercurial records metadata when you tell it to perform a
    1.72 +	rename or copy. It uses this metadata during a merge to do the
    1.73 +	right thing in the case of a merge.  For instance, if I rename
    1.74 +	a file, and you edit it without renaming it, when we merge our
    1.75 +	work the file will be renamed and have your edits
    1.76 +	applied.</para>
    1.77 +    </sect2>
    1.78    </sect1>
    1.79 +
    1.80    <sect1>
    1.81      <title>Other interesting design features</title>
    1.82  
    1.83 @@ -575,8 +595,8 @@
    1.84  	  compression package).  This combination of algorithm and
    1.85  	  compression of the entire stream (instead of a revision at a
    1.86  	  time) substantially reduces the number of bytes to be
    1.87 -	  transferred, yielding better network performance over almost
    1.88 -	  all kinds of network.</para>
    1.89 +	  transferred, yielding better network performance over most
    1.90 +	  kinds of network.</para>
    1.91  
    1.92  	<para id="x_329">(If the connection is over <command>ssh</command>,
    1.93  	  Mercurial <emphasis>doesn't</emphasis> recompress the