Mercurial > hgbook
comparison en/ch02-tour-merge.xml @ 828:477d6a3e5023
Many final changes.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Mon, 04 May 2009 23:52:38 -0700 |
parents | d2aacc06e562 |
children | 18131160f7ee |
comparison
equal
deleted
inserted
replaced
827:d2aacc06e562 | 828:477d6a3e5023 |
---|---|
144 parents</command> and the contents of | 144 parents</command> and the contents of |
145 <filename>hello.c</filename>.</para> | 145 <filename>hello.c</filename>.</para> |
146 | 146 |
147 &interaction.tour.merge.parents; | 147 &interaction.tour.merge.parents; |
148 </sect2> | 148 </sect2> |
149 | |
149 <sect2> | 150 <sect2> |
150 <title>Committing the results of the merge</title> | 151 <title>Committing the results of the merge</title> |
151 | 152 |
152 <para id="x_348">Whenever we've done a merge, <command role="hg-cmd">hg | 153 <para id="x_348">Whenever we've done a merge, <command role="hg-cmd">hg |
153 parents</command> will display two parents until we <command | 154 parents</command> will display two parents until we <command |
290 available, too many to cover here. They vary in which | 291 available, too many to cover here. They vary in which |
291 platforms they are available for, and in their particular | 292 platforms they are available for, and in their particular |
292 strengths and weaknesses. Most are tuned for merging files | 293 strengths and weaknesses. Most are tuned for merging files |
293 containing plain text, while a few are aimed at specialised | 294 containing plain text, while a few are aimed at specialised |
294 file formats (generally XML).</para> | 295 file formats (generally XML).</para> |
295 | |
296 </sect2> | 296 </sect2> |
297 | |
297 <sect2> | 298 <sect2> |
298 <title>A worked example</title> | 299 <title>A worked example</title> |
299 | 300 |
300 <para id="x_359">In this example, we will reproduce the file modification | 301 <para id="x_359">In this example, we will reproduce the file modification |
301 history of <xref linkend="fig:tour-merge:conflict"/> | 302 history of <xref linkend="fig:tour-merge:conflict"/> |
363 you should strongly consider upgrading to a newer version | 364 you should strongly consider upgrading to a newer version |
364 before trying to tackle complicated merges.</para> | 365 before trying to tackle complicated merges.</para> |
365 </note> | 366 </note> |
366 </sect2> | 367 </sect2> |
367 </sect1> | 368 </sect1> |
369 | |
368 <sect1 id="sec:tour-merge:fetch"> | 370 <sect1 id="sec:tour-merge:fetch"> |
369 <title>Simplifying the pull-merge-commit sequence</title> | 371 <title>Simplifying the pull-merge-commit sequence</title> |
370 | 372 |
371 <para id="x_362">The process of merging changes as outlined above is | 373 <para id="x_362">The process of merging changes as outlined above is |
372 straightforward, but requires running three commands in | 374 straightforward, but requires running three commands in |
419 <para id="x_368">(Normally, the right-hand side of the | 421 <para id="x_368">(Normally, the right-hand side of the |
420 <quote><literal>=</literal></quote> would indicate where to find | 422 <quote><literal>=</literal></quote> would indicate where to find |
421 the extension, but since the <literal | 423 the extension, but since the <literal |
422 role="hg-ext">fetch</literal> extension is in the standard | 424 role="hg-ext">fetch</literal> extension is in the standard |
423 distribution, Mercurial knows where to search for it.)</para> | 425 distribution, Mercurial knows where to search for it.)</para> |
424 | 426 </sect1> |
427 | |
428 <sect1> | |
429 <title>Renaming, copying, and merging</title> | |
430 | |
431 <para>During the life of a project, we will often want to change | |
432 the layout of its files and directories. This can be as simple | |
433 as renaming a single file, or as complex as restructuring the | |
434 entire hierarchy of files within the project.</para> | |
435 | |
436 <para>Mercurial supports these kinds of complex changes fluently, | |
437 provided we tell it what we're doing. If we want to rename a | |
438 file, we should use the <command>hg rename</command><footnote> | |
439 <para>If you're a Unix user, you'll be glad to know that the | |
440 <command>hg rename</command> command can be abbreviated as | |
441 <command>hg mv</command>.</para> | |
442 </footnote> command to rename it, so that Mercurial can do the | |
443 right thing later when we merge.</para> | |
444 | |
445 <para>We will cover the use of these commands in more detail in | |
446 <xref linkend="chap:daily.copy"/>.</para> | |
425 </sect1> | 447 </sect1> |
426 </chapter> | 448 </chapter> |
427 | 449 |
428 <!-- | 450 <!-- |
429 local variables: | 451 local variables: |