comparison en/ch04-daily.xml @ 828:477d6a3e5023

Many final changes.
author Bryan O'Sullivan <bos@serpentine.com>
date Mon, 04 May 2009 23:52:38 -0700
parents 6b7818eb3d8e
children
comparison
equal deleted inserted replaced
827:d2aacc06e562 828:477d6a3e5023
106 </sect1> 106 </sect1>
107 107
108 <sect1> 108 <sect1>
109 <title>How to stop tracking a file</title> 109 <title>How to stop tracking a file</title>
110 110
111 <para id="x_1af">Once you decide that a file no longer belongs in your 111 <para id="x_1af">Once you decide that a file no longer belongs in
112 repository, use the <command role="hg-cmd">hg remove</command> 112 your repository, use the <command role="hg-cmd">hg
113 command. This deletes the file, and tells Mercurial to stop 113 remove</command> command. This deletes the file, and tells
114 tracking it. A removed file is represented in the output of 114 Mercurial to stop tracking it (which will occur at the next
115 commit). A removed file is represented in the output of
115 <command role="hg-cmd">hg status</command> with a 116 <command role="hg-cmd">hg status</command> with a
116 <quote><literal>R</literal></quote>.</para> 117 <quote><literal>R</literal></quote>.</para>
117 118
118 &interaction.daily.files.remove; 119 &interaction.daily.files.remove;
119 120
212 213
213 &interaction.daily.files.commit-addremove; 214 &interaction.daily.files.commit-addremove;
214 </sect2> 215 </sect2>
215 </sect1> 216 </sect1>
216 217
217 <sect1> 218 <sect1 id="chap:daily.copy">
218 <title>Copying files</title> 219 <title>Copying files</title>
219 220
220 <para id="x_1bc">Mercurial provides a <command role="hg-cmd">hg 221 <para id="x_1bc">Mercurial provides a <command role="hg-cmd">hg
221 copy</command> command that lets you make a new copy of a 222 copy</command> command that lets you make a new copy of a
222 file. When you copy a file using this command, Mercurial makes 223 file. When you copy a file using this command, Mercurial makes
533 while the file won't be touched in any way, it won't be tracked 534 while the file won't be touched in any way, it won't be tracked
534 for adding by Mercurial any longer, either. You can also use 535 for adding by Mercurial any longer, either. You can also use
535 <command role="hg-cmd">hg revert</command> to get rid of 536 <command role="hg-cmd">hg revert</command> to get rid of
536 erroneous changes to a file.</para> 537 erroneous changes to a file.</para>
537 538
538 <para id="x_1e4">It's good to remember that the <command role="hg-cmd">hg 539 <para id="x_1e4">It is helpful to remember that the <command
539 revert</command> command is useful for changes that you have 540 role="hg-cmd">hg revert</command> command is useful for
540 not yet committed. Once you've committed a change, if you 541 changes that you have not yet committed. Once you've committed
541 decide it was a mistake, you can still do something about it, 542 a change, if you decide it was a mistake, you can still do
542 though your options may be more limited.</para> 543 something about it, though your options may be more
544 limited.</para>
543 545
544 <para id="x_1e5">For more information about the <command 546 <para id="x_1e5">For more information about the <command
545 role="hg-cmd">hg revert</command> command, and details about 547 role="hg-cmd">hg revert</command> command, and details about
546 how to deal with changes you have already committed, see <xref 548 how to deal with changes you have already committed, see <xref
547 linkend="chap:undo"/>.</para> 549 linkend="chap:undo"/>.</para>
815 you'll need to do a little scripting to refresh the list of 817 you'll need to do a little scripting to refresh the list of
816 repositories to back up.</para> 818 repositories to back up.</para>
817 819
818 <para id="x_6d9">If you perform traditional backups of your master 820 <para id="x_6d9">If you perform traditional backups of your master
819 repositories to tape or disk, and you want to back up a 821 repositories to tape or disk, and you want to back up a
820 repository named <filename>myrepo</filename>. Use <command>hg 822 repository named <filename>myrepo</filename>, use <command>hg
821 clone -U myrepo myrepo.bak</command> to create a 823 clone -U myrepo myrepo.bak</command> to create a
822 clone of <filename>myrepo</filename> before you start your 824 clone of <filename>myrepo</filename> before you start your
823 backups. The <option>-U</option> option doesn't check out a 825 backups. The <option>-U</option> option doesn't check out a
824 working directory after the clone completes, since that would be 826 working directory after the clone completes, since that would be
825 superfluous and make the backup take longer.</para> 827 superfluous and make the backup take longer.</para>