Mercurial > hg-website
comparison hgscm/templates/workflow_guide.html @ 167:af506d1a935d
workflow_guide: added some missing <p> tags.
author | Arne Babenhauserheide <bab@draketo.de> |
---|---|
date | Thu, 14 May 2009 00:41:24 +0200 |
parents | 6358437dccf2 |
children | b1b6c75efced |
comparison
equal
deleted
inserted
replaced
166:6358437dccf2 | 167:af506d1a935d |
---|---|
79 | 79 |
80 <pre>$ hg diff | 80 <pre>$ hg diff |
81 | 81 |
82 </pre> | 82 </pre> |
83 | 83 |
84 commit the changes. | 84 <p><hg>commit</hg> the changes.</p> |
85 | 85 |
86 <pre>$ hg commit | 86 <pre>$ hg commit |
87 | 87 |
88 </pre> | 88 </pre> |
89 | 89 |
114 | 114 |
115 <pre>$ hg log | 115 <pre>$ hg log |
116 | 116 |
117 </pre> | 117 </pre> |
118 | 118 |
119 This prints a list of changesets along with their date, the user who committed them (you) and their commit message. | 119 <p>This prints a list of changesets along with their date, the user who committed them (you) and their commit message. </p> |
120 | 120 |
121 To see a certain revision, you can use the <hg>-r</hg> switch (--revision). To also see the diff of the displayed revisions, there's the <hg>-p</hg> switch (--patch) | 121 <p>To see a certain revision, you can use the <hg>-r</hg> switch (--revision). To also see the diff of the displayed revisions, there's the <hg>-p</hg> switch (--patch)</p> |
122 | 122 |
123 <pre>$ hg log -p -r 3 | 123 <pre>$ hg log -p -r 3 |
124 | 124 |
125 </pre> | 125 </pre> |
126 | 126 |
299 | 299 |
300 <p>Note: You also have to commit after a merge when there are no conflicts, because merging creates new history and you might want to attach a specific message to the merge (like "merge feature1").</p> | 300 <p>Note: You also have to commit after a merge when there are no conflicts, because merging creates new history and you might want to attach a specific message to the merge (like "merge feature1").</p> |
301 | 301 |
302 <h5>Rollback mistakes</h5> | 302 <h5>Rollback mistakes</h5> |
303 | 303 |
304 Now you can work on different features in parallel, but from time to time a bad commit might sneak in. Naturally you could then just go back one revision and merge the stray error, keeping all mistakes out of the merged revision. However, there's an easier way, if you realize your error before you do another <hg>commit</hg> or <hg>pull</hg>: <hg>rollback</hg>. | 304 <p>Now you can work on different features in parallel, but from time to time a bad commit might sneak in. Naturally you could then just go back one revision and merge the stray error, keeping all mistakes out of the merged revision. However, there's an easier way, if you realize your error before you do another <hg>commit</hg> or <hg>pull</hg>: <hg>rollback</hg>.</p> |
305 | 305 |
306 Rolling back means undoing the last operation which added something to your history. | 306 <p>Rolling back means undoing the last operation which added something to your history.</p> |
307 | 307 |
308 Imagine you just realized that you did a bad commit - for example you didn't see a spelling error in a label. To fix it you would use | 308 <p>Imagine you just realized that you did a bad commit - for example you didn't see a spelling error in a label. To fix it you would use</p> |
309 | 309 |
310 <pre>hg rollback | 310 <pre>hg rollback |
311 | 311 |
312 </pre> | 312 </pre> |
313 | 313 |
314 And then redo the commit | 314 <p>And then redo the commit</p> |
315 | 315 |
316 <pre>hg commit -m "message" | 316 <pre>hg commit -m "message" |
317 | 317 |
318 </pre> | 318 </pre> |
319 | 319 |
320 If you can use the command history of your shell and you added the previous message via <hg>commit -m "message"</hg>, that following commit just means two clicks on the arrow-key "up" and one click on "enter". | 320 <p>If you can use the command history of your shell and you added the previous message via <hg>commit -m "message"</hg>, that following commit just means two clicks on the arrow-key "up" and one click on "enter".</p> |
321 | 321 |
322 Though it changes your history, rolling back doesn't change your files. It only undoes the last addition to your history. | 322 <p>Though it changes your history, rolling back doesn't change your files. It only undoes the last addition to your history.</p> |
323 | 323 |
324 But beware, that a rollback itself can't be undone. If you <hg>rollback</hg> and then forget to commit, you can't just say "give me my old commit back". You have to create a new commit. | 324 <p>But beware, that a rollback itself can't be undone. If you <hg>rollback</hg> and then forget to commit, you can't just say "give me my old commit back". You have to create a new commit.</p> |
325 | 325 |
326 Note: Rollback is possible, because Mercurial uses transactions when recording changes, and you can use the transaction record to undo the last transaction. This means that you can also use <hg>rollback</hg> to undo your last <hg>pull</hg>, if you didn't yet commit aything new. | 326 <p>Note: Rollback is possible, because Mercurial uses transactions when recording changes, and you can use the transaction record to undo the last transaction. This means that you can also use <hg>rollback</hg> to undo your last <hg>pull</hg>, if you didn't yet commit aything new.</p> |
327 | 327 |
328 <h2>Sharing changes</h2> | 328 <h2>Sharing changes</h2> |
329 | 329 |
330 <h3>Use Case</h3> | 330 <h3>Use Case</h3> |
331 | 331 |
406 </pre> | 406 </pre> |
407 | 407 |
408 <p>Note: The <em>patchbomb</em> extension automates the email-sending, but you don't need it for this workflow.</p> | 408 <p>Note: The <em>patchbomb</em> extension automates the email-sending, but you don't need it for this workflow.</p> |
409 | 409 |
410 <p>Note 2: You can also send around bundles, which are snippets of your actual history. Just create them via </p> | 410 <p>Note 2: You can also send around bundles, which are snippets of your actual history. Just create them via </p> |
411 | |
411 <pre>$ hg bundle --base FIRST_REVISION_TO_BUNDLE changes.bundle | 412 <pre>$ hg bundle --base FIRST_REVISION_TO_BUNDLE changes.bundle |
412 | 413 |
413 </pre> | 414 </pre> |
415 | |
414 <p>Others can then get your changes by simply pulling them, as if your bundle were an actual repository</p> | 416 <p>Others can then get your changes by simply pulling them, as if your bundle were an actual repository</p> |
415 <pre>$ hg pull path/to/changes.bundle | 417 <pre>$ hg pull path/to/changes.bundle |
416 | 418 |
417 </pre> | 419 </pre> |
418 | 420 |