comparison text/learning_mercurial_in_workflows.txt @ 138:741911a6f770

learning in workflows: A bit of polishing.
author Arne Babenhauserheide <bab@draketo.de>
date Fri, 01 May 2009 15:08:53 +0200
parents defbaee4011c
children 2fcd14a3b9f9
comparison
equal deleted inserted replaced
137:defbaee4011c 138:741911a6f770
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: 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. 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 it the cleaner way, 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
135 $ hg update 3 135 $ hg update 3
136 $ (fix the bug) 136 $ (fix the bug)