comparison en/ch07-branch.xml @ 828:477d6a3e5023

Many final changes.
author Bryan O'Sullivan <bos@serpentine.com>
date Mon, 04 May 2009 23:52:38 -0700
parents e6c99cbd0abd
children
comparison
equal deleted inserted replaced
827:d2aacc06e562 828:477d6a3e5023
181 an exact copy of the repository as of a particular changeset. 181 an exact copy of the repository as of a particular changeset.
182 The new clone will not contain any project history that comes 182 The new clone will not contain any project history that comes
183 after the revision you specified. This has an interaction 183 after the revision you specified. This has an interaction
184 with tags that can surprise the unwary.</para> 184 with tags that can surprise the unwary.</para>
185 185
186 <para id="x_381">Recall that a tag is stored as a revision to the <filename 186 <para id="x_381">Recall that a tag is stored as a revision to
187 role="special">.hgtags</filename> file, so that when you 187 the <filename role="special">.hgtags</filename> file. When you
188 create a tag, the changeset in which it's recorded necessarily 188 create a tag, the changeset in which its recorded refers to an
189 refers to an older changeset. When you run <command 189 older changeset. When you run <command role="hg-cmd">hg clone
190 role="hg-cmd">hg clone -r foo</command> to clone a 190 -r foo</command> to clone a repository as of tag
191 repository as of tag <literal>foo</literal>, the new clone 191 <literal>foo</literal>, the new clone <emphasis>will not
192 <emphasis>will not contain the history that created the 192 contain any revision newer than the one the tag refers to,
193 tag</emphasis> that you used to clone the repository. The 193 including the revision where the tag was created</emphasis>.
194 result is that you'll get exactly the right subset of the 194 The result is that you'll get exactly the right subset of the
195 project's history in the new repository, but 195 project's history in the new repository, but
196 <emphasis>not</emphasis> the tag you might have 196 <emphasis>not</emphasis> the tag you might have
197 expected.</para> 197 expected.</para>
198 </sect2> 198 </sect2>
199 199
225 </sect1> 225 </sect1>
226 226
227 <sect1> 227 <sect1>
228 <title>The flow of changes&emdash;big picture vs. little</title> 228 <title>The flow of changes&emdash;big picture vs. little</title>
229 229
230 <para id="x_384">To return to the outline I sketched at the beginning of a 230 <para id="x_384">To return to the outline I sketched at the
231 chapter, let's think about a project that has multiple 231 beginning of the chapter, let's think about a project that has
232 concurrent pieces of work under development at once.</para> 232 multiple concurrent pieces of work under development at
233 once.</para>
233 234
234 <para id="x_385">There might be a push for a new <quote>main</quote> release; 235 <para id="x_385">There might be a push for a new <quote>main</quote> release;
235 a new minor bugfix release to the last main release; and an 236 a new minor bugfix release to the last main release; and an
236 unexpected <quote>hot fix</quote> to an old release that is now 237 unexpected <quote>hot fix</quote> to an old release that is now
237 in maintenance mode.</para> 238 in maintenance mode.</para>
414 <title>Dealing with multiple named branches in a 415 <title>Dealing with multiple named branches in a
415 repository</title> 416 repository</title>
416 417
417 <para id="x_39e">If you have more than one named branch in a repository, 418 <para id="x_39e">If you have more than one named branch in a repository,
418 Mercurial will remember the branch that your working directory 419 Mercurial will remember the branch that your working directory
419 on when you start a command like <command role="hg-cmd">hg 420 is on when you start a command like <command role="hg-cmd">hg
420 update</command> or <command role="hg-cmd">hg pull 421 update</command> or <command role="hg-cmd">hg pull
421 -u</command>. It will update the working directory to the tip 422 -u</command>. It will update the working directory to the tip
422 of this branch, no matter what the <quote>repo-wide</quote> tip 423 of this branch, no matter what the <quote>repo-wide</quote> tip
423 is. To update to a revision that's on a different named branch, 424 is. To update to a revision that's on a different named branch,
424 you may need to use the <option role="hg-opt-update">-C</option> 425 you may need to use the <option role="hg-opt-update">-C</option>