Mercurial > hgbook
comparison en/ch06-collab.xml @ 666:8fcd44708f41
Uncomment all the mangled interaction examples.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Mon, 09 Mar 2009 23:22:09 -0700 |
parents | 21c62e09b99f |
children | 13513d2a128d |
comparison
equal
deleted
inserted
replaced
665:27043f385f3f | 666:8fcd44708f41 |
---|---|
198 branch will never affect a stable branch unless someone | 198 branch will never affect a stable branch unless someone |
199 explicitly merges those changes in.</para> | 199 explicitly merges those changes in.</para> |
200 | 200 |
201 <para>Here's an example of how this can work in practice. Let's | 201 <para>Here's an example of how this can work in practice. Let's |
202 say you have one <quote>main branch</quote> on a central | 202 say you have one <quote>main branch</quote> on a central |
203 server. <!-- &interaction.branching.init; --> People clone it, | 203 server.</para> |
204 make changes locally, test them, and push them back.</para> | 204 |
205 &interaction.branching.init; | |
206 | |
207 <para>People clone it, make changes locally, test them, and push | |
208 them back.</para> | |
205 | 209 |
206 <para>Once the main branch reaches a release milestone, you can | 210 <para>Once the main branch reaches a release milestone, you can |
207 use the <command role="hg-cmd">hg tag</command> command to | 211 use the <command role="hg-cmd">hg tag</command> command to |
208 give a permanent name to the milestone revision. <!-- | 212 give a permanent name to the milestone revision.</para> |
209 &interaction.branching.tag; --> Let's say some ongoing | 213 |
210 development occurs on the main branch. <!-- | 214 &interaction.branching.tag; |
211 &interaction.branching.main; --> Using the tag that was | 215 |
212 recorded at the milestone, people who clone that repository at | 216 <para>Let's say some ongoing |
213 any time in the future can use <command role="hg-cmd">hg | 217 development occurs on the main branch.</para> |
214 update</command> to get a copy of the working directory | 218 |
215 exactly as it was when that tagged revision was committed. | 219 &interaction.branching.main; |
216 <!-- &interaction.branching.update; --></para> | 220 |
221 <para>Using the tag that was recorded at the milestone, people | |
222 who clone that repository at any time in the future can use | |
223 <command role="hg-cmd">hg update</command> to get a copy of | |
224 the working directory exactly as it was when that tagged | |
225 revision was committed.</para> | |
226 | |
227 &interaction.branching.update; | |
217 | 228 |
218 <para>In addition, immediately after the main branch is tagged, | 229 <para>In addition, immediately after the main branch is tagged, |
219 someone can then clone the main branch on the server to a new | 230 someone can then clone the main branch on the server to a new |
220 <quote>stable</quote> branch, also on the server. <!-- | 231 <quote>stable</quote> branch, also on the server.</para> |
221 &interaction.branching.clone; --></para> | 232 |
233 &interaction.branching.clone; | |
222 | 234 |
223 <para>Someone who needs to make a change to the stable branch | 235 <para>Someone who needs to make a change to the stable branch |
224 can then clone <emphasis>that</emphasis> repository, make | 236 can then clone <emphasis>that</emphasis> repository, make |
225 their changes, commit, and push their changes back there. <!-- | 237 their changes, commit, and push their changes back there.</para> |
226 &interaction.branching.stable; --> Because Mercurial | 238 |
227 repositories are independent, and Mercurial doesn't move | 239 &interaction.branching.stable; |
228 changes around automatically, the stable and main branches are | 240 |
229 <emphasis>isolated</emphasis> from each other. The changes | 241 <para>Because Mercurial repositories are independent, and |
230 that you made on the main branch don't <quote>leak</quote> to | 242 Mercurial doesn't move changes around automatically, the |
231 the stable branch, and vice versa.</para> | 243 stable and main branches are <emphasis>isolated</emphasis> |
244 from each other. The changes that you made on the main branch | |
245 don't <quote>leak</quote> to the stable branch, and vice | |
246 versa.</para> | |
232 | 247 |
233 <para>You'll often want all of your bugfixes on the stable | 248 <para>You'll often want all of your bugfixes on the stable |
234 branch to show up on the main branch, too. Rather than | 249 branch to show up on the main branch, too. Rather than |
235 rewrite a bugfix on the main branch, you can simply pull and | 250 rewrite a bugfix on the main branch, you can simply pull and |
236 merge changes from the stable to the main branch, and | 251 merge changes from the stable to the main branch, and |
237 Mercurial will bring those bugfixes in for you. <!-- | 252 Mercurial will bring those bugfixes in for you.</para> |
238 &interaction.branching.merge; --> The main branch will still | 253 |
239 contain changes that are not on the stable branch, but it will | 254 &interaction.branching.merge; |
240 also contain all of the bugfixes from the stable branch. The | 255 |
241 stable branch remains unaffected by these changes.</para> | 256 <para>The main branch will still contain changes that are not on |
257 the stable branch, but it will also contain all of the | |
258 bugfixes from the stable branch. The stable branch remains | |
259 unaffected by these changes.</para> | |
242 | 260 |
243 </sect2> | 261 </sect2> |
244 <sect2> | 262 <sect2> |
245 <title>Feature branches</title> | 263 <title>Feature branches</title> |
246 | 264 |