Mercurial > evolve
comparison tests/test-evolve-stop-orphan.t @ 3843:f0096db2a7b1
evolve: improve error messages when conflicts occur
This patch improves the error messages when conflicts occur.
First, we drop the line 'evolution failed', that is not the best line we can
show and evolution didn't failed, it's just interrupted by the conflicts and
when user will run `hg evolve --continue`, things will be fine. I still remember
when I first saw 'evolution failed', I got a bit scare as am I in a recoverable
position or not. So let's drop this scary line.
Second, we replace the error messages to say `resolve conflicts and see
help-topic`. The help topic was added recently and documents all the three flags
very well. Addition of tests also showed that all the three flags works fine
with all the three instability type. So we should advertise them more.
Third, we now raise the error with our error message rather than raising
MergeFailure and having evolution related text in hint or stderr above. This
increase the focus on the error message we want to show.
After this patch, I think error messages by evolve in case of conflicts will be
same in every case.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Tue, 12 Jun 2018 19:00:12 +0530 |
parents | f67ac33c07d2 |
children | 629558d09898 |
comparison
equal
deleted
inserted
replaced
3842:b293cce4ff55 | 3843:f0096db2a7b1 |
---|---|
88 $ hg evolve | 88 $ hg evolve |
89 move:[4] added d | 89 move:[4] added d |
90 atop:[5] added c | 90 atop:[5] added c |
91 merging d | 91 merging d |
92 warning: conflicts while merging d! (edit, then use 'hg resolve --mark') | 92 warning: conflicts while merging d! (edit, then use 'hg resolve --mark') |
93 evolve failed! | 93 abort: fix conflicts and see `hg help evolve.interrupted` |
94 see `hg help evolve.interrupted` | |
95 abort: unresolved merge conflicts (see hg help resolve) | |
96 [255] | 94 [255] |
97 | 95 |
98 $ hg evolve --stop | 96 $ hg evolve --stop |
99 stopped the interrupted evolve | 97 stopped the interrupted evolve |
100 working directory is now at cb6a2ab625bb | 98 working directory is now at cb6a2ab625bb |
136 $ hg next --evolve | 134 $ hg next --evolve |
137 move:[4] added d | 135 move:[4] added d |
138 atop:[5] added c | 136 atop:[5] added c |
139 merging d | 137 merging d |
140 warning: conflicts while merging d! (edit, then use 'hg resolve --mark') | 138 warning: conflicts while merging d! (edit, then use 'hg resolve --mark') |
141 evolve failed! | 139 abort: fix conflicts and see `hg help evolve.interrupted` |
142 see `hg help evolve.interrupted` | |
143 abort: unresolved merge conflicts (see hg help resolve) | |
144 [255] | 140 [255] |
145 | 141 |
146 $ hg diff | 142 $ hg diff |
147 diff -r cb6a2ab625bb d | 143 diff -r cb6a2ab625bb d |
148 --- a/d Thu Jan 01 00:00:00 1970 +0000 | 144 --- a/d Thu Jan 01 00:00:00 1970 +0000 |
185 $ hg evolve | 181 $ hg evolve |
186 move:[4] added d | 182 move:[4] added d |
187 atop:[5] added c | 183 atop:[5] added c |
188 merging d | 184 merging d |
189 warning: conflicts while merging d! (edit, then use 'hg resolve --mark') | 185 warning: conflicts while merging d! (edit, then use 'hg resolve --mark') |
190 evolve failed! | 186 abort: fix conflicts and see `hg help evolve.interrupted` |
191 see `hg help evolve.interrupted` | |
192 abort: unresolved merge conflicts (see hg help resolve) | |
193 [255] | 187 [255] |
194 $ echo foo > d | 188 $ echo foo > d |
195 $ hg resolve -m | 189 $ hg resolve -m |
196 (no more unresolved files) | 190 (no more unresolved files) |
197 continue: hg evolve --continue | 191 continue: hg evolve --continue |
238 atop:[8] added a | 232 atop:[8] added a |
239 move:[5] added c | 233 move:[5] added c |
240 atop:[9] added b | 234 atop:[9] added b |
241 merging c | 235 merging c |
242 warning: conflicts while merging c! (edit, then use 'hg resolve --mark') | 236 warning: conflicts while merging c! (edit, then use 'hg resolve --mark') |
243 evolve failed! | 237 abort: fix conflicts and see `hg help evolve.interrupted` |
244 see `hg help evolve.interrupted` | |
245 abort: unresolved merge conflicts (see hg help resolve) | |
246 [255] | 238 [255] |
247 | 239 |
248 $ hg status | 240 $ hg status |
249 M c | 241 M c |
250 A d | 242 A d |
277 $ hg evolve --all | 269 $ hg evolve --all |
278 move:[5] added c | 270 move:[5] added c |
279 atop:[9] added b | 271 atop:[9] added b |
280 merging c | 272 merging c |
281 warning: conflicts while merging c! (edit, then use 'hg resolve --mark') | 273 warning: conflicts while merging c! (edit, then use 'hg resolve --mark') |
282 evolve failed! | 274 abort: fix conflicts and see `hg help evolve.interrupted` |
283 see `hg help evolve.interrupted` | |
284 abort: unresolved merge conflicts (see hg help resolve) | |
285 [255] | 275 [255] |
286 | 276 |
287 $ echo foobar > c | 277 $ echo foobar > c |
288 $ hg resolve -m | 278 $ hg resolve -m |
289 (no more unresolved files) | 279 (no more unresolved files) |
355 atop:[12] added a | 345 atop:[12] added a |
356 move:[10] added c | 346 move:[10] added c |
357 atop:[13] added b | 347 atop:[13] added b |
358 merging c | 348 merging c |
359 warning: conflicts while merging c! (edit, then use 'hg resolve --mark') | 349 warning: conflicts while merging c! (edit, then use 'hg resolve --mark') |
360 evolve failed! | 350 abort: fix conflicts and see `hg help evolve.interrupted` |
361 see `hg help evolve.interrupted` | |
362 abort: unresolved merge conflicts (see hg help resolve) | |
363 [255] | 351 [255] |
364 | 352 |
365 $ hg evolve --stop | 353 $ hg evolve --stop |
366 stopped the interrupted evolve | 354 stopped the interrupted evolve |
367 working directory is now at a3f4b95da934 | 355 working directory is now at a3f4b95da934 |