Mercurial > hg-website
comparison text/learning_mercurial_in_workflows.txt @ 137:defbaee4011c
learning in workflows: two minor fixes.
author | Arne Babenhauserheide <bab@draketo.de> |
---|---|
date | Fri, 01 May 2009 15:08:35 +0200 |
parents | 0364cfc00295 |
children | 741911a6f770 |
comparison
equal
deleted
inserted
replaced
136:0364cfc00295 | 137:defbaee4011c |
---|---|
84 | 84 |
85 Also you check your history from time to time, so see how you progressed. | 85 Also you check your history from time to time, so see how you progressed. |
86 | 86 |
87 === Workflow === | 87 === Workflow === |
88 | 88 |
89 ==== Basics from sysadmin ==== | 89 ==== Basics from log keeping ==== |
90 | 90 |
91 Init your project, add files, see changes and commit them. | 91 Init your project, add files, see changes and commit them. |
92 | 92 |
93 <code>$ hg init project | 93 <code>$ hg init project |
94 $ cd project | 94 $ cd project |
124 | 124 |
125 Note: To get a revision devoid of files, just "update" to "null" via "hg update null". That's the revision before any files were added. | 125 Note: To get a revision devoid of files, just "update" to "null" via "hg update null". That's the revision before any files were added. |
126 | 126 |
127 ==== Fixing errors in earlier revisions ==== | 127 ==== Fixing errors in earlier revisions ==== |
128 | 128 |
129 When you find a bug in some earlier revision you have two options: eaither you can fix it in the current code, or you can go back in history and fix the code exactly where you did it. | 129 When you find a bug in some earlier revision you have two options: either you can fix it in the current code, or you can go back in history and fix the code exactly where you did it, which creates a cleaner history. |
130 | 130 |
131 To do so, you first update to the old revision, fix the bug and commit it. Afterwards you merge this revision and commit the merge. Don't worry, though: Merging in mercurial is fast and painless, as you'll see in an instant. | 131 To do so, you first update to the old revision, fix the bug and commit it. Afterwards you merge this revision and commit the merge. Don't worry, though: Merging in mercurial is fast and painless, as you'll see in an instant. |
132 | 132 |
133 Let's assume the bug was introduced in revision 3. | 133 Let's assume the bug was introduced in revision 3. |
134 | 134 |