hgbook
changeset 620:2ff0a43f1152
Update ch03
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Mon Apr 06 23:13:53 2009 -0700 (2009-04-06) |
parents | 4e23c220d1b0 |
children | e9ef075327c1 |
files | en/ch03-concepts.xml en/figs/filelog.svg |
line diff
1.1 --- a/en/ch03-concepts.xml Mon Apr 06 22:05:44 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
2.1 --- a/en/figs/filelog.svg Mon Apr 06 22:05:44 2009 -0700 2.2 +++ b/en/figs/filelog.svg Mon Apr 06 23:13:53 2009 -0700 2.3 @@ -2,7 +2,7 @@ 2.4 <!-- Created with Inkscape (http://www.inkscape.org/) --> 2.5 <svg 2.6 xmlns:dc="http://purl.org/dc/elements/1.1/" 2.7 - xmlns:cc="http://web.resource.org/cc/" 2.8 + xmlns:cc="http://creativecommons.org/ns#" 2.9 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 2.10 xmlns:svg="http://www.w3.org/2000/svg" 2.11 xmlns="http://www.w3.org/2000/svg" 2.12 @@ -13,12 +13,19 @@ 2.13 height="1052.3622047" 2.14 id="svg2" 2.15 sodipodi:version="0.32" 2.16 - inkscape:version="0.45.1" 2.17 + inkscape:version="0.46" 2.18 sodipodi:docname="filelog.svg" 2.19 sodipodi:docbase="/home/arun/hgbook/en" 2.20 inkscape:output_extension="org.inkscape.output.svg.inkscape"> 2.21 <defs 2.22 id="defs4"> 2.23 + <inkscape:perspective 2.24 + sodipodi:type="inkscape:persp3d" 2.25 + inkscape:vp_x="0 : 526.18109 : 1" 2.26 + inkscape:vp_y="0 : 1000 : 0" 2.27 + inkscape:vp_z="744.09448 : 526.18109 : 1" 2.28 + inkscape:persp3d-origin="372.04724 : 350.78739 : 1" 2.29 + id="perspective57" /> 2.30 <marker 2.31 inkscape:stockid="Arrow1Mend" 2.32 orient="auto" 2.33 @@ -189,11 +196,12 @@ 2.34 inkscape:cx="455.8122" 2.35 inkscape:cy="520" 2.36 inkscape:document-units="px" 2.37 - inkscape:current-layer="layer1" 2.38 + inkscape:current-layer="g2940" 2.39 inkscape:window-width="1680" 2.40 inkscape:window-height="970" 2.41 - inkscape:window-x="0" 2.42 - inkscape:window-y="54" /> 2.43 + inkscape:window-x="3" 2.44 + inkscape:window-y="46" 2.45 + showgrid="false" /> 2.46 <metadata 2.47 id="metadata7"> 2.48 <rdf:RDF> 2.49 @@ -245,7 +253,7 @@ 2.50 id="tspan2920" 2.51 x="323.72824" 2.52 y="416.7626" 2.53 - style="font-family:Courier">.hg/store/data/README.i</tspan></text> 2.54 + style="font-family:Courier">.hg/store/data/_r_e_a_d_m_e.i</tspan></text> 2.55 </g> 2.56 <g 2.57 transform="translate(3.79093e-5,-80.1853)"