Mercurial > hg-website
comparison text/learning_mercurial_in_workflows.txt @ 133:5e1cff189630
learning in workflows: Fix: Moved the resolve explanation to the first mention of resolve.
author | Arne Babenhauserheide <bab@draketo.de> |
---|---|
date | Fri, 01 May 2009 14:01:08 +0200 |
parents | a7fb926c69f6 |
children | 4fc2fc6ddbed |
comparison
equal
deleted
inserted
replaced
132:a7fb926c69f6 | 133:5e1cff189630 |
---|---|
133 | 133 |
134 $ hg merge | 134 $ hg merge |
135 | 135 |
136 If there are conflicts use "hg resolve" - that's also what merge tells you to do in case of conflicts. | 136 If there are conflicts use "hg resolve" - that's also what merge tells you to do in case of conflicts. |
137 | 137 |
138 First list the files with conflicts: | |
139 | |
140 $ hg resolve --list | |
141 | |
142 Then resolve them one by one. "resolve" attempts the merge again: | |
143 | |
144 $ hg resolve conflicting_file | |
145 (fix it by hand, if necessary) | |
146 | |
147 Mark the fixed file as resolved: | |
148 | |
149 $ hg resolve --mark conflicting_file | |
150 | |
151 Commit the merge, as soon as you resolved all conflicts. This step is also necessary if there were no conflicts! | |
152 | |
138 $ hg commit | 153 $ hg commit |
139 | 154 |
140 At this point, your fix is merged with all your other work, and you can just go on coding. Additionally the history shows clearly where you fixed the bug, so you'll always be able to check where the bug was. | 155 At this point, your fix is merged with all your other work, and you can just go on coding. Additionally the history shows clearly where you fixed the bug, so you'll always be able to check where the bug was. |
141 | 156 |
157 Note: Most merges will just work. You only need "resolve", when "merge" complains. | |
142 | 158 |
143 So now you can initialize repositories, save changes, update to previous changes and develop in a nonlinear history by committing in earlier changesets and merging the changes into the current code. | 159 So now you can initialize repositories, save changes, update to previous changes and develop in a nonlinear history by committing in earlier changesets and merging the changes into the current code. |
144 | 160 |
145 == Seperate features == | 161 == Seperate features == |
146 | 162 |
179 | 195 |
180 $ hg merge | 196 $ hg merge |
181 | 197 |
182 If there are conflicts use "hg resolve" - that's also what merge tells you to do in case of conflicts. | 198 If there are conflicts use "hg resolve" - that's also what merge tells you to do in case of conflicts. |
183 | 199 |
184 First list the files with conflicts: | |
185 | |
186 $ hg resolve --list | |
187 | |
188 Then resolve them one by one. "resolve" attempts the merge again: | |
189 | |
190 $ hg resolve conflicting_file | |
191 (fix it by hand, if necessary) | |
192 | |
193 Mark the fixed file as resolved: | |
194 | |
195 $ hg resolve --mark conflicting_file | |
196 | |
197 Commit the merge, as soon as you resolved all conflicts. This step is also necessary if there were no conflicts! | |
198 | |
199 $ hg commit -m "merged feature1" | 200 $ hg commit -m "merged feature1" |
200 | 201 |
201 You can create an arbitrary number of clones and also carry them around on USB sticks. Also you can use them to synchronize your files at home and at work, or between your desktop and your laptop. | 202 You can create an arbitrary number of clones and also carry them around on USB sticks. Also you can use them to synchronize your files at home and at work, or between your desktop and your laptop. |
202 | |
203 Note: Most merges will just work. You only need "resolve", when "merge" complains. | |
204 | 203 |
205 == Sharing changes == | 204 == Sharing changes == |
206 | 205 |
207 === Use Case === | 206 === Use Case === |
208 | 207 |