Mercurial > hgbook
comparison en/ch09-undo.xml @ 739:a13813534ccd
Fix all xref to figs
author | Dongsheng Song <dongsheng.song@gmail.com> |
---|---|
date | Tue, 17 Mar 2009 10:43:45 +0800 |
parents | cfdb601a3c8b |
children |
comparison
equal
deleted
inserted
replaced
738:1a3d882149fd | 739:a13813534ccd |
---|---|
352 backout</command> command has done. | 352 backout</command> command has done. |
353 &interaction.backout.simple.log; Notice that the new changeset | 353 &interaction.backout.simple.log; Notice that the new changeset |
354 that <command role="hg-cmd">hg backout</command> has created | 354 that <command role="hg-cmd">hg backout</command> has created |
355 is a child of the changeset we backed out. It's easier to see | 355 is a child of the changeset we backed out. It's easier to see |
356 this in figure <xref | 356 this in figure <xref |
357 linkend="fig.undo.backout"/>, which presents a graphical | 357 endterm="fig.undo.backout.caption" linkend="fig.undo.backout"/>, |
358 which presents a graphical | |
358 view of the change history. As you can see, the history is | 359 view of the change history. As you can see, the history is |
359 nice and linear.</para> | 360 nice and linear.</para> |
360 | 361 |
361 <informalfigure id="fig.undo.backout"> | 362 <informalfigure id="fig.undo.backout"> |
362 <mediaobject><imageobject><imagedata | 363 <mediaobject> |
363 fileref="images/undo-simple.png"/></imageobject><textobject><phrase>XXX | 364 <imageobject><imagedata fileref="images/undo-simple.png"/> |
364 add text</phrase></textobject><caption><para>Backing out | 365 </imageobject> |
365 a change using the <command role="hg-cmd">hg | 366 <textobject><phrase>XXX add text</phrase></textobject> |
366 backout</command> | 367 <caption><para id="fig.undo.backout.caption">Backing out |
367 command</para></caption></mediaobject> | 368 a change using the |
368 | 369 <command role="hg-cmd">hg backout</command> |
370 command</para></caption> | |
371 </mediaobject> | |
369 </informalfigure> | 372 </informalfigure> |
370 | 373 |
371 </sect2> | 374 </sect2> |
372 <sect2> | 375 <sect2> |
373 <title>Backing out a non-tip change</title> | 376 <title>Backing out a non-tip change</title> |
391 second.</para> | 394 second.</para> |
392 | 395 |
393 &interaction.backout.non-tip.cat; | 396 &interaction.backout.non-tip.cat; |
394 | 397 |
395 <para>As the graphical history in figure <xref | 398 <para>As the graphical history in figure <xref |
399 endterm="fig.undo.backout-non-tip.caption" | |
396 linkend="fig.undo.backout-non-tip"/> illustrates, Mercurial | 400 linkend="fig.undo.backout-non-tip"/> illustrates, Mercurial |
397 actually commits <emphasis>two</emphasis> changes in this kind | 401 actually commits <emphasis>two</emphasis> changes in this kind |
398 of situation (the box-shaped nodes are the ones that Mercurial | 402 of situation (the box-shaped nodes are the ones that Mercurial |
399 commits automatically). Before Mercurial begins the backout | 403 commits automatically). Before Mercurial begins the backout |
400 process, it first remembers what the current parent of the | 404 process, it first remembers what the current parent of the |
405 | 409 |
406 <para>% TODO: to me it looks like mercurial doesn't commit the | 410 <para>% TODO: to me it looks like mercurial doesn't commit the |
407 second merge automatically!</para> | 411 second merge automatically!</para> |
408 | 412 |
409 <informalfigure id="fig.undo.backout-non-tip"> | 413 <informalfigure id="fig.undo.backout-non-tip"> |
410 <mediaobject><imageobject><imagedata | 414 <mediaobject> |
411 fileref="images/undo-non-tip.png"/></imageobject><textobject><phrase>XXX | 415 <imageobject><imagedata fileref="images/undo-non-tip.png"/> |
412 add text</phrase></textobject><caption><para>Automated | 416 </imageobject> |
413 backout of a non-tip change using the <command | 417 <textobject><phrase>XXX add text</phrase></textobject> |
414 role="hg-cmd">hg backout</command> | 418 <caption><para id="fig.undo.backout-non-tip.caption">Automated |
415 command</para></caption></mediaobject> | 419 backout of a non-tip change using the |
420 <command role="hg-cmd">hg backout</command> command</para></caption> | |
421 </mediaobject> | |
416 </informalfigure> | 422 </informalfigure> |
417 | 423 |
418 <para>The result is that you end up <quote>back where you | 424 <para>The result is that you end up <quote>back where you |
419 were</quote>, only with some extra history that undoes the | 425 were</quote>, only with some extra history that undoes the |
420 effect of the changeset you wanted to back out.</para> | 426 effect of the changeset you wanted to back out.</para> |
463 | 469 |
464 &interaction.backout.manual.log; | 470 &interaction.backout.manual.log; |
465 | 471 |
466 <para>Again, it's easier to see what has happened by looking at | 472 <para>Again, it's easier to see what has happened by looking at |
467 a graph of the revision history, in figure <xref | 473 a graph of the revision history, in figure <xref |
474 endterm="fig.undo.backout-manual.caption" | |
468 linkend="fig.undo.backout-manual"/>. This makes it clear | 475 linkend="fig.undo.backout-manual"/>. This makes it clear |
469 that when we use <command role="hg-cmd">hg backout</command> | 476 that when we use <command role="hg-cmd">hg backout</command> |
470 to back out a change other than the tip, Mercurial adds a new | 477 to back out a change other than the tip, Mercurial adds a new |
471 head to the repository (the change it committed is | 478 head to the repository (the change it committed is |
472 box-shaped).</para> | 479 box-shaped).</para> |
473 | 480 |
474 <informalfigure id="fig.undo.backout-manual"> | 481 <informalfigure id="fig.undo.backout-manual"> |
475 <mediaobject><imageobject><imagedata | 482 <mediaobject> |
476 fileref="images/undo-manual.png"/></imageobject><textobject><phrase>XXX | 483 <imageobject><imagedata fileref="images/undo-manual.png"/> |
477 add text</phrase></textobject><caption><para>Backing out | 484 </imageobject> |
478 a change using the <command role="hg-cmd">hg | 485 <textobject><phrase>XXX add text</phrase></textobject> |
479 backout</command> | 486 <caption><para id="fig.undo.backout-manual.caption">Backing out a |
480 command</para></caption></mediaobject> | 487 change using the <command role="hg-cmd">hg backout</command> |
481 | 488 command</para></caption> |
489 </mediaobject> | |
482 </informalfigure> | 490 </informalfigure> |
483 | 491 |
484 <para>After the <command role="hg-cmd">hg backout</command> | 492 <para>After the <command role="hg-cmd">hg backout</command> |
485 command has completed, it leaves the new | 493 command has completed, it leaves the new |
486 <quote>backout</quote> changeset as the parent of the working | 494 <quote>backout</quote> changeset as the parent of the working |
507 | 515 |
508 &interaction.backout.manual.merge; | 516 &interaction.backout.manual.merge; |
509 | 517 |
510 <para>Afterwards, the graphical history of our repository looks | 518 <para>Afterwards, the graphical history of our repository looks |
511 like figure | 519 like figure |
512 <xref linkend="fig.undo.backout-manual-merge"/>.</para> | 520 <xref endterm="fig.undo.backout-manual-merge.caption" |
521 linkend="fig.undo.backout-manual-merge"/>.</para> | |
513 | 522 |
514 <informalfigure id="fig.undo.backout-manual-merge"> | 523 <informalfigure id="fig.undo.backout-manual-merge"> |
515 <mediaobject><imageobject><imagedata | 524 <mediaobject> |
516 fileref="images/undo-manual-merge.png"/></imageobject><textobject><phrase>XXX | 525 <imageobject><imagedata fileref="images/undo-manual-merge.png"/> |
517 add text</phrase></textobject><caption><para>Manually | 526 </imageobject> |
518 merging a backout change</para></caption></mediaobject> | 527 <textobject><phrase>XXX add text</phrase></textobject> |
519 | 528 <caption><para id="fig.undo.backout-manual-merge.caption">Manually |
529 merging a backout change</para></caption> | |
530 </mediaobject> | |
520 </informalfigure> | 531 </informalfigure> |
521 | 532 |
522 </sect2> | 533 </sect2> |
523 <sect2> | 534 <sect2> |
524 <title>Why <command role="hg-cmd">hg backout</command> works as | 535 <title>Why <command role="hg-cmd">hg backout</command> works as |