changeset 100:272146fab009

Add yet another illustration of the merge process.
author Bryan O'Sullivan <bos@serpentine.com>
date Wed, 18 Oct 2006 12:06:56 -0700
parents 06383f9e46e4
children 321732566ac1
files en/Makefile en/tour-merge-merge.svg en/tour-merge.tex
diffstat 3 files changed, 397 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/en/Makefile	Mon Oct 16 14:54:37 2006 -0700
+++ b/en/Makefile	Wed Oct 18 12:06:56 2006 -0700
@@ -22,7 +22,8 @@
 	mq-stack.svg \
 	tour-history.svg \
 	tour-merge-sep-repos.svg \
-	tour-merge-pull.svg
+	tour-merge-pull.svg \
+	tour-merge-merge.svg
 
 example-sources := \
 	daily.files \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/en/tour-merge-merge.svg	Wed Oct 18 12:06:56 2006 -0700
@@ -0,0 +1,381 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://web.resource.org/cc/"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="744.09448819"
+   height="1052.3622047"
+   id="svg2"
+   sodipodi:version="0.32"
+   inkscape:version="0.44.1"
+   sodipodi:docname="tour-merge-merge.svg"
+   sodipodi:docbase="/home/bos/hg/hgbook/en">
+  <defs
+     id="defs4">
+    <marker
+       inkscape:stockid="Arrow1Mstart"
+       orient="auto"
+       refY="0.0"
+       refX="0.0"
+       id="Arrow1Mstart"
+       style="overflow:visible">
+      <path
+         id="path2973"
+         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
+         transform="scale(0.4) translate(10,0)" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Mend"
+       orient="auto"
+       refY="0.0"
+       refX="0.0"
+       id="Arrow1Mend"
+       style="overflow:visible;">
+      <path
+         id="path3066"
+         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
+         transform="scale(0.4) rotate(180) translate(10,0)" />
+    </marker>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     gridtolerance="10000"
+     guidetolerance="10"
+     objecttolerance="10"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="1.4"
+     inkscape:cx="247.53795"
+     inkscape:cy="871.05738"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     inkscape:window-width="906"
+     inkscape:window-height="620"
+     inkscape:window-x="38"
+     inkscape:window-y="95" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1">
+    <rect
+       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="rect2995"
+       width="94.285713"
+       height="20.714285"
+       x="532.85718"
+       y="203.0479" />
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
+       x="173.57143"
+       y="443.79074"
+       id="text2832"><tspan
+         sodipodi:role="line"
+         id="tspan2834"
+         x="173.57143"
+         y="443.79074" /></text>
+    <rect
+       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="rect2830"
+       width="94.285713"
+       height="20.714285"
+       x="138"
+       y="297.76227" />
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
+       x="162.09892"
+       y="311.38342"
+       id="text2824"><tspan
+         sodipodi:role="line"
+         id="tspan2826"
+         x="162.09892"
+         y="311.38342"
+         style="font-family:Courier"><tspan
+   style="font-weight:bold"
+   id="tspan2862">4</tspan>: b57f</tspan></text>
+    <path
+       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
+       d="M 185.14286,343.63731 L 185.14286,319.47656"
+       id="path2900"
+       inkscape:connector-type="polyline" />
+    <rect
+       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="rect2863"
+       width="94.285713"
+       height="20.714285"
+       x="91.428574"
+       y="250.47656" />
+    <text
+       xml:space="preserve"
+       style="font-size:12.00001812px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
+       x="116.09886"
+       y="264.56592"
+       id="text1965"
+       transform="scale(1.000002,0.999998)"><tspan
+         sodipodi:role="line"
+         id="tspan1967"
+         x="116.09886"
+         y="264.56592"
+         style="font-family:Courier"><tspan
+   style="font-weight:bold"
+   id="tspan1973">5</tspan>: ae13</tspan></text>
+    <path
+       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1.00000143px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1;display:inline"
+       d="M 173.95727,296.76228 L 149.75702,272.19085"
+       id="path1971"
+       inkscape:connector-type="polyline"
+       inkscape:connection-end="#rect2863"
+       inkscape:connection-start="#rect2830" />
+    <rect
+       style="fill:#78a5ad;fill-opacity:1;stroke:#507b84;stroke-width:2.00000286;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="rect2911"
+       width="94.285995"
+       height="20.714283"
+       x="186.71414"
+       y="204.40514" />
+    <text
+       xml:space="preserve"
+       style="font-size:12.00001812px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
+       x="210.81311"
+       y="218.02673"
+       id="text2913"
+       transform="scale(1.000002,0.999998)"><tspan
+         sodipodi:role="line"
+         id="tspan2915"
+         x="210.81311"
+         y="218.02673"
+         style="font-family:Courier"><tspan
+   id="tspan1966"
+   style="font-weight:bold">6</tspan>: d2b5</tspan></text>
+    <path
+       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1.00000143px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1;display:inline"
+       d="M 191.06908,296.76228 L 227.93092,226.11942"
+       id="path2919"
+       inkscape:connector-type="polyline"
+       inkscape:connection-start="#rect2830" />
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
+       x="295.28571"
+       y="217.56711"
+       id="text2871"><tspan
+         sodipodi:role="line"
+         id="tspan2873"
+         x="295.28571"
+         y="217.56711">tip (and head)</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
+       x="76"
+       y="264.91769"
+       id="text2875"><tspan
+         sodipodi:role="line"
+         id="tspan2877"
+         x="76"
+         y="264.91769"
+         style="text-align:end;text-anchor:end">head</tspan></text>
+    <rect
+       style="fill:#c8aaa5;fill-opacity:1;stroke:#a07163;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:2, 4;stroke-dashoffset:0;stroke-opacity:1"
+       id="rect1913"
+       width="94.285713"
+       height="20.714285"
+       x="138"
+       y="156.90514" />
+    <path
+       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:2, 2;stroke-dashoffset:0;stroke-opacity:1"
+       d="M 144.22399,249.47657 L 179.49029,178.61943"
+       id="path1915"
+       inkscape:connector-type="polyline"
+       inkscape:connection-start="#rect2863"
+       inkscape:connection-end="#rect1913" />
+    <path
+       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:2, 2;stroke-dashoffset:0;stroke-opacity:1"
+       d="M 222.20966,203.40514 L 196.79033,178.61943"
+       id="path1917"
+       inkscape:connector-type="polyline"
+       inkscape:connection-start="#rect2911"
+       inkscape:connection-end="#rect1913" />
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
+       x="166.16823"
+       y="168.52228"
+       id="text2806"><tspan
+         sodipodi:role="line"
+         id="tspan2808"
+         x="166.16823"
+         y="168.52228"
+         style="font-family:Courier">merge</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
+       x="246"
+       y="162.63338"
+       id="text2810"><tspan
+         sodipodi:role="line"
+         id="tspan2812"
+         x="246"
+         y="162.63338">working directory</tspan><tspan
+         sodipodi:role="line"
+         x="246"
+         y="177.63338"
+         id="tspan2814">during merge</tspan></text>
+    <rect
+       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="rect2816"
+       width="94.285713"
+       height="20.714285"
+       x="483.14636"
+       y="297.76227" />
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
+       x="507.24527"
+       y="311.38342"
+       id="text2818"><tspan
+         sodipodi:role="line"
+         id="tspan2820"
+         x="507.24527"
+         y="311.38342"
+         style="font-family:Courier"><tspan
+   style="font-weight:bold"
+   id="tspan2822">4</tspan>: b57f</tspan></text>
+    <path
+       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
+       d="M 530.28921,343.6373 L 530.28921,319.47655"
+       id="path2824"
+       inkscape:connector-type="polyline" />
+    <rect
+       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="rect2826"
+       width="94.285713"
+       height="20.714285"
+       x="436.57492"
+       y="250.47656" />
+    <text
+       xml:space="preserve"
+       style="font-size:12.00001812px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
+       x="461.24484"
+       y="264.56613"
+       id="text2828"
+       transform="scale(1.000002,0.999998)"><tspan
+         sodipodi:role="line"
+         id="tspan2830"
+         x="461.24484"
+         y="264.56613"
+         style="font-family:Courier"><tspan
+   style="font-weight:bold"
+   id="tspan2832">5</tspan>: ae13</tspan></text>
+    <path
+       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1.00000143px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1;display:inline"
+       d="M 519.10362,296.76227 L 494.90337,272.19084"
+       id="path2834"
+       inkscape:connector-type="polyline" />
+    <rect
+       style="fill:#78a5ad;fill-opacity:1;stroke:#507b84;stroke-width:2.00000286;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="rect2836"
+       width="94.285995"
+       height="20.714283"
+       x="483.14001"
+       y="156.548" />
+    <text
+       xml:space="preserve"
+       style="font-size:12.00001812px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
+       x="555.95911"
+       y="218.02698"
+       id="text2838"
+       transform="scale(1.000002,0.999998)"><tspan
+         sodipodi:role="line"
+         id="tspan2840"
+         x="555.95911"
+         y="218.02698"
+         style="font-family:Courier"><tspan
+   id="tspan2842"
+   style="font-weight:bold">6</tspan>: d2b5</tspan></text>
+    <path
+       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1.00000143px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1;display:inline"
+       d="M 536.21543,296.76227 L 574.03453,224.76218"
+       id="path2844"
+       inkscape:connector-type="polyline" />
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
+       x="594.43207"
+       y="169.78796"
+       id="text2846"><tspan
+         sodipodi:role="line"
+         id="tspan2848"
+         x="594.43207"
+         y="169.78796">tip</tspan></text>
+    <path
+       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-start:none;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:inline"
+       d="M 489.37034,249.47656 L 524.65575,178.26229"
+       id="path2856"
+       inkscape:connector-type="polyline"
+       inkscape:connection-end="#rect2836" />
+    <path
+       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:inline"
+       d="M 567.85714,202.0479 L 542.42591,178.26229"
+       id="path2858"
+       inkscape:connector-type="polyline"
+       inkscape:connection-end="#rect2836"
+       inkscape:connection-start="#rect2995" />
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
+       x="504.54507"
+       y="170.39714"
+       id="text2860"><tspan
+         sodipodi:role="line"
+         id="tspan2863"
+         x="504.54507"
+         y="170.39714"
+         style="font-family:Courier"><tspan
+   style="font-weight:bold"
+   id="tspan2997">7</tspan>: dba3</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
+       x="90.323105"
+       y="120.21933"
+       id="text2929"><tspan
+         sodipodi:role="line"
+         id="tspan2931"
+         x="90.323105"
+         y="120.21933"
+         style="font-weight:bold">Working directory during merge</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
+       x="435.35226"
+       y="120.21933"
+       id="text2937"><tspan
+         sodipodi:role="line"
+         id="tspan2939"
+         x="435.35226"
+         y="120.21933"
+         style="font-weight:bold">Repository after merge committed</tspan></text>
+  </g>
+</svg>
--- a/en/tour-merge.tex	Mon Oct 16 14:54:37 2006 -0700
+++ b/en/tour-merge.tex	Wed Oct 18 12:06:56 2006 -0700
@@ -72,12 +72,22 @@
 update to the new tip?
 \interaction{tour.merge.update}
 Mercurial is telling us that the \hgcmd{update} command won't do a
-merge.  Instead, we use the \hgcmd{merge} command to merge the two
-heads.
+merge; it won't update the working directory when it thinks we might
+be wanting to do a merge, unless we force it to do so.  Instead, we
+use the \hgcmd{merge} command to merge the two heads.
 \interaction{tour.merge.merge}
+
+\begin{figure}[ht]
+  \centering
+  \grafix{tour-merge-merge}
+  \caption{Working directory and repository during merge, and
+    following commit}
+  \label{fig:tour-merge:merge}
+\end{figure}
+
 This updates the working directory so that it contains changes from
-both heads, which is reflected in both the output of \hgcmd{parents}
-and the contents of \filename{hello.c}.
+\emph{both} heads, which is reflected in both the output of
+\hgcmd{parents} and the contents of \filename{hello.c}.
 \interaction{tour.merge.parents}
 Whenever we've done a merge, \hgcmd{parents} will display two parents
 until we \hgcmd{commit} the results of the merge.