Mercurial > hgbook
comparison en/ch02-tour-merge.xml @ 691:4ce9d0754af3
Remove the words "section", "chapter", etc from in front of xref tags.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Thu, 26 Mar 2009 21:22:03 -0700 |
parents | b788b405e141 |
children | 0b45854f0b7b |
comparison
equal
deleted
inserted
replaced
690:b788b405e141 | 691:4ce9d0754af3 |
---|---|
35 &interaction.tour.merge.clone; | 35 &interaction.tour.merge.clone; |
36 | 36 |
37 <para id="x_33d">We should now have two copies of | 37 <para id="x_33d">We should now have two copies of |
38 <filename>hello.c</filename> with different contents. The | 38 <filename>hello.c</filename> with different contents. The |
39 histories of the two repositories have also diverged, as | 39 histories of the two repositories have also diverged, as |
40 illustrated in figure <xref | 40 illustrated in <xref |
41 linkend="fig:tour-merge:sep-repos"/>.</para> | 41 linkend="fig:tour-merge:sep-repos"/>.</para> |
42 | 42 |
43 &interaction.tour.merge.cat; | 43 &interaction.tour.merge.cat; |
44 | 44 |
45 <figure id="fig:tour-merge:sep-repos"> | 45 <figure id="fig:tour-merge:sep-repos"> |
81 </imageobject> | 81 </imageobject> |
82 <textobject><phrase>XXX add text</phrase></textobject> | 82 <textobject><phrase>XXX add text</phrase></textobject> |
83 </mediaobject> | 83 </mediaobject> |
84 </figure> | 84 </figure> |
85 | 85 |
86 <para id="x_343">In figure <xref linkend="fig:tour-merge:pull"/>, you can | 86 <para id="x_343">In <xref linkend="fig:tour-merge:pull"/>, you can |
87 see the effect of the pull from <filename | 87 see the effect of the pull from <filename |
88 class="directory">my-hello</filename> into <filename | 88 class="directory">my-hello</filename> into <filename |
89 class="directory">my-new-hello</filename>. The history that | 89 class="directory">my-new-hello</filename>. The history that |
90 was already present in <filename | 90 was already present in <filename |
91 class="directory">my-new-hello</filename> is untouched, but | 91 class="directory">my-new-hello</filename> is untouched, but |
92 a new revision has been added. By referring to figure <xref | 92 a new revision has been added. By referring to <xref |
93 linkend="fig:tour-merge:sep-repos"/>, we can see that the | 93 linkend="fig:tour-merge:sep-repos"/>, we can see that the |
94 <emphasis>changeset ID</emphasis> remains the same in the new | 94 <emphasis>changeset ID</emphasis> remains the same in the new |
95 repository, but the <emphasis>revision number</emphasis> has | 95 repository, but the <emphasis>revision number</emphasis> has |
96 changed. (This, incidentally, is a fine example of why it's | 96 changed. (This, incidentally, is a fine example of why it's |
97 not safe to use revision numbers when discussing changesets.) | 97 not safe to use revision numbers when discussing changesets.) |
154 These are the same revisions that were previously displayed by | 154 These are the same revisions that were previously displayed by |
155 <command role="hg-cmd">hg parents</command>.</para> | 155 <command role="hg-cmd">hg parents</command>.</para> |
156 | 156 |
157 &interaction.tour.merge.tip; | 157 &interaction.tour.merge.tip; |
158 | 158 |
159 <para id="x_34a">In figure <xref | 159 <para id="x_34a">In <xref |
160 linkend="fig:tour-merge:merge"/>, you can see a | 160 linkend="fig:tour-merge:merge"/>, you can see a |
161 representation of what happens to the working directory during | 161 representation of what happens to the working directory during |
162 the merge, and how this affects the repository when the commit | 162 the merge, and how this affects the repository when the commit |
163 happens. During the merge, the working directory has two | 163 happens. During the merge, the working directory has two |
164 parent changesets, and these become the parents of the new | 164 parent changesets, and these become the parents of the new |
182 <imageobject><imagedata fileref="tour-merge-conflict"/></imageobject> | 182 <imageobject><imagedata fileref="tour-merge-conflict"/></imageobject> |
183 <textobject><phrase>XXX add text</phrase></textobject> | 183 <textobject><phrase>XXX add text</phrase></textobject> |
184 </mediaobject> | 184 </mediaobject> |
185 </figure> | 185 </figure> |
186 | 186 |
187 <para id="x_34d">Figure <xref linkend="fig:tour-merge:conflict"/> illustrates | 187 <para id="x_34d"><xref linkend="fig:tour-merge:conflict"/> illustrates |
188 an instance of two conflicting changes to a document. We | 188 an instance of two conflicting changes to a document. We |
189 started with a single version of the file; then we made some | 189 started with a single version of the file; then we made some |
190 changes; while someone else made different changes to the same | 190 changes; while someone else made different changes to the same |
191 text. Our task in resolving the conflicting changes is to | 191 text. Our task in resolving the conflicting changes is to |
192 decide what the file should look like.</para> | 192 decide what the file should look like.</para> |
212 | 212 |
213 <para id="x_350">My preferred graphical merge tool is | 213 <para id="x_350">My preferred graphical merge tool is |
214 <command>kdiff3</command>, which I'll use to describe the | 214 <command>kdiff3</command>, which I'll use to describe the |
215 features that are common to graphical file merging tools. You | 215 features that are common to graphical file merging tools. You |
216 can see a screenshot of <command>kdiff3</command> in action in | 216 can see a screenshot of <command>kdiff3</command> in action in |
217 figure <xref linkend="fig:tour-merge:kdiff3"/>. The kind of | 217 <xref linkend="fig:tour-merge:kdiff3"/>. The kind of |
218 merge it is performing is called a <emphasis>three-way | 218 merge it is performing is called a <emphasis>three-way |
219 merge</emphasis>, because there are three different versions | 219 merge</emphasis>, because there are three different versions |
220 of the file of interest to us. The tool thus splits the upper | 220 of the file of interest to us. The tool thus splits the upper |
221 portion of the window into three panes:</para> | 221 portion of the window into three panes:</para> |
222 <itemizedlist> | 222 <itemizedlist> |
272 </sect2> | 272 </sect2> |
273 <sect2> | 273 <sect2> |
274 <title>A worked example</title> | 274 <title>A worked example</title> |
275 | 275 |
276 <para id="x_359">In this example, we will reproduce the file modification | 276 <para id="x_359">In this example, we will reproduce the file modification |
277 history of figure <xref linkend="fig:tour-merge:conflict"/> | 277 history of <xref linkend="fig:tour-merge:conflict"/> |
278 above. Let's begin by creating a repository with a base | 278 above. Let's begin by creating a repository with a base |
279 version of our document.</para> | 279 version of our document.</para> |
280 | 280 |
281 &interaction.tour-merge-conflict.wife; | 281 &interaction.tour-merge-conflict.wife; |
282 | 282 |