comparison tests/test-evolve-content-divergent-stack.t @ 5572:d7d954b6d518

evolve: remove swapping nodes logic while resolving divergence Before this patch, while solving content-divergence if one of the divergent cset need to relocate to resolution parent we used to set that cset to "other" side; so it was like we are always going to relocate "other" side which made us to swap the two if "divergent" cset need to relocate. Above mentioned solution for relocating cset was not good and led us to incorrect output in some cases. So this patch, simplify the logic and remove the swapping thing and clearly depend on resolution parent to check if any of the divergent cset needs to relocate. This also means that now in some cases if both the divergent csets needs to relocate, both will be relocated. Even before this patch, there are some cases where both the divergent csets relocated but not in every case where it should have. Coming to the changes in test files: 1) changes in order of merging the two divergent csets is due to fact that now "divergent" and "other" are not swapped and hence "divergent" will be at local side and "other" will be at "other", which also results in change in the hash id for some cases. 2) extra changesets: which is the result of the fact that now we don't miss any case where both the divergent csets should be based on resolution parent before performing the merge -> which caught some cases and performed relocation, hence extra changesets. Although you can find that there is no changes in file content because of these relocation, but I remember loosing some data because of not relocating the "divergent", so why leave any risk out there by not relocating "other" to the resolution parent.
author Sushil khanchi <sushilkhanchi97@gmail.com>
date Sun, 20 Sep 2020 09:22:04 +0530
parents 4c3656aaacc6
children 6289ddfb9d48
comparison
equal deleted inserted replaced
5571:b2de5825e5ca 5572:d7d954b6d518
147 0 files updated, 0 files merged, 0 files removed, 0 files unresolved 147 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
148 merge:[6] added b 148 merge:[6] added b
149 with: [10] added b 149 with: [10] added b
150 base: [2] added b 150 base: [2] added b
151 rebasing "divergent" content-divergent changeset d5f148423c16 on df93a529fa42 151 rebasing "divergent" content-divergent changeset d5f148423c16 on df93a529fa42
152 rebasing "other" content-divergent changeset 88516dccf68a on df93a529fa42
152 0 files updated, 0 files merged, 0 files removed, 0 files unresolved 153 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
153 merge:[7] added c 154 merge:[7] added c
154 with: [11] added c 155 with: [11] added c
155 base: [3] added c 156 base: [3] added c
156 rebasing "divergent" content-divergent changeset 3ce4be6d8e5e on 365f419742a3 157 rebasing "divergent" content-divergent changeset 3ce4be6d8e5e on aca5a88a1692
158 rebasing "other" content-divergent changeset 9e5fb1d5b955 on aca5a88a1692
157 0 files updated, 0 files merged, 0 files removed, 0 files unresolved 159 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
158 merge:[8] added d 160 merge:[8] added d
159 with: [12] added d 161 with: [12] added d
160 base: [4] added d 162 base: [4] added d
161 rebasing "divergent" content-divergent changeset c72d2885eb51 on a18171c7d9e7 163 rebasing "divergent" content-divergent changeset c72d2885eb51 on 67e04919c9a4
164 rebasing "other" content-divergent changeset 15c781f93cac on 67e04919c9a4
162 0 files updated, 0 files merged, 0 files removed, 0 files unresolved 165 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
163 working directory is now at df93a529fa42 166 working directory is now at df93a529fa42
164 167
165 $ hg glog 168 $ hg glog
166 o 19:59d49942cf47 added d 169 o 22:e72164a86fb4 added d
167 | () [default] draft 170 | () [default] draft
168 o 17:a18171c7d9e7 added c 171 o 19:67e04919c9a4 added c
169 | () [default] draft 172 | () [default] draft
170 o 15:365f419742a3 added b 173 o 16:aca5a88a1692 added b
171 | () [default] draft 174 | () [default] draft
172 @ 13:df93a529fa42 watbar to a 175 @ 13:df93a529fa42 watbar to a
173 | () [default] draft 176 | () [default] draft
174 o 0:8fa14d15e168 added hgignore 177 o 0:8fa14d15e168 added hgignore
175 () [default] draft 178 () [default] draft
180 hit merge conflict in relocation. This test makes sure that 183 hit merge conflict in relocation. This test makes sure that
181 content of two divergent csets merged correctly after the 184 content of two divergent csets merged correctly after the
182 merge conflict. 185 merge conflict.
183 186
184 $ hg log -r "desc('added c')" -p 187 $ hg log -r "desc('added c')" -p
185 changeset: 17:a18171c7d9e7 188 changeset: 19:67e04919c9a4
186 parent: 15:365f419742a3 189 parent: 16:aca5a88a1692
187 user: test 190 user: test
188 date: Thu Jan 01 00:00:00 1970 +0000 191 date: Thu Jan 01 00:00:00 1970 +0000
189 summary: added c 192 summary: added c
190 193
191 diff -r 365f419742a3 -r a18171c7d9e7 c 194 diff -r aca5a88a1692 -r 67e04919c9a4 c
192 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 195 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
193 +++ b/c Thu Jan 01 00:00:00 1970 +0000 196 +++ b/c Thu Jan 01 00:00:00 1970 +0000
194 @@ -0,0 +1,1 @@ 197 @@ -0,0 +1,1 @@
195 +foo 198 +foo
196 199
197 $ hg strip -r 16: --hidden 200 $ hg strip -r 17: --hidden
198 saved backup bundle to $TESTTMP/stacktest/.hg/strip-backup/b949c7ad8d83-6039d2cc-backup.hg 201 saved backup bundle to $TESTTMP/stacktest/.hg/strip-backup/f1cd8f167491-3817ebd7-backup.hg
199 4 new orphan changesets 202 4 new orphan changesets
200 4 new content-divergent changesets 203 4 new content-divergent changesets
201 $ hg glog 204 $ hg glog
202 o 15:365f419742a3 added b 205 o 16:aca5a88a1692 added b
203 | () [default] draft 206 | () [default] draft
204 @ 13:df93a529fa42 watbar to a 207 @ 13:df93a529fa42 watbar to a
205 | () [default] draft 208 | () [default] draft
206 | * 12:15c781f93cac added d 209 | * 12:15c781f93cac added d
207 | | () [default] draft 210 | | () [default] draft
221 |/ () [default] draft 224 |/ () [default] draft
222 o 0:8fa14d15e168 added hgignore 225 o 0:8fa14d15e168 added hgignore
223 () [default] draft 226 () [default] draft
224 $ hg next 227 $ hg next
225 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 228 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
226 [15] added b 229 [16] added b
227 $ echo conflict > c 230 $ echo conflict > c
228 $ hg amend -A 231 $ hg amend -A
229 adding c 232 adding c
230 233
231 add some changes on "other" side, to check later that merging performed correctly 234 add some changes on "other" side, to check later that merging performed correctly
232 $ hg up -r 11 235 $ hg up -r 11
233 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 236 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
234 $ echo new_file > newfile 237 $ echo new_file > newfile
235 $ hg amend -Am "added c and newfile" 238 $ hg amend -Am "added c and newfile"
236 adding newfile 239 adding newfile
240 $ hg glog
241 @ 18:2ecfb60af48a added c and newfile
242 | () [default] draft
243 | o 17:5907cbc074a0 added b
244 | | () [default] draft
245 | o 13:df93a529fa42 watbar to a
246 | | () [default] draft
247 | | * 12:15c781f93cac added d
248 | | | () [default] draft
249 +---x 11:9e5fb1d5b955 added c
250 | | () [default] draft
251 x | 10:88516dccf68a added b
252 | | () [default] draft
253 x | 9:82b74d5dc678 watbar to a
254 |/ () [default] draft
255 | * 8:c72d2885eb51 added d
256 | | () [default] draft
257 | * 7:3ce4be6d8e5e added c
258 | | () [default] draft
259 | x 6:d5f148423c16 added b
260 | | () [default] draft
261 | x 5:8e222f257bbf watbar to a
262 |/ () [default] draft
263 o 0:8fa14d15e168 added hgignore
264 () [default] draft
237 265
238 $ hg evolve --content-divergent -r 7 266 $ hg evolve --content-divergent -r 7
239 merge:[7] added c 267 merge:[7] added c
240 with: [17] added c and newfile 268 with: [18] added c and newfile
241 base: [3] added c 269 base: [3] added c
242 rebasing "divergent" content-divergent changeset 3ce4be6d8e5e on fb488ec29dfa 270 rebasing "divergent" content-divergent changeset 3ce4be6d8e5e on 5907cbc074a0
243 merging c 271 merging c
244 warning: conflicts while merging c! (edit, then use 'hg resolve --mark') 272 warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
245 unresolved merge conflicts 273 unresolved merge conflicts
246 (see 'hg help evolve.interrupted') 274 (see 'hg help evolve.interrupted')
247 [1] 275 [1]
250 (no more unresolved files) 278 (no more unresolved files)
251 continue: hg evolve --continue 279 continue: hg evolve --continue
252 280
253 $ hg evolve --continue 281 $ hg evolve --continue
254 evolving 7:3ce4be6d8e5e "added c" 282 evolving 7:3ce4be6d8e5e "added c"
283 rebasing "other" content-divergent changeset 2ecfb60af48a on 5907cbc074a0
284 merging c
285 warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
286 unresolved merge conflicts
287 (see 'hg help evolve.interrupted')
288 [1]
289 $ hg diff
290 diff -r 5907cbc074a0 c
291 --- a/c Thu Jan 01 00:00:00 1970 +0000
292 +++ b/c Thu Jan 01 00:00:00 1970 +0000
293 @@ -1,1 +1,5 @@
294 +<<<<<<< destination: 5907cbc074a0 - test: added b
295 conflict
296 +=======
297 +foo
298 +>>>>>>> evolving: 2ecfb60af48a - test: added c and newfile
299 diff -r 5907cbc074a0 newfile
300 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
301 +++ b/newfile Thu Jan 01 00:00:00 1970 +0000
302 @@ -0,0 +1,1 @@
303 +new_file
304
305 $ echo c > c
306 $ hg res -m
307 (no more unresolved files)
308 continue: hg evolve --continue
309 $ hg evolve -c
310 evolving 18:2ecfb60af48a "added c and newfile"
255 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 311 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
256 working directory is now at 3d278b2f60ff 312 working directory is now at 7e8d59a0286a
313
257 $ hg log -p -l1 314 $ hg log -p -l1
258 changeset: 19:3d278b2f60ff 315 changeset: 21:7e8d59a0286a
259 tag: tip 316 tag: tip
260 parent: 16:fb488ec29dfa 317 parent: 17:5907cbc074a0
261 user: test 318 user: test
262 date: Thu Jan 01 00:00:00 1970 +0000 319 date: Thu Jan 01 00:00:00 1970 +0000
263 summary: added c and newfile 320 summary: added c and newfile
264 321
265 diff -r fb488ec29dfa -r 3d278b2f60ff c 322 diff -r 5907cbc074a0 -r 7e8d59a0286a c
266 --- a/c Thu Jan 01 00:00:00 1970 +0000 323 --- a/c Thu Jan 01 00:00:00 1970 +0000
267 +++ b/c Thu Jan 01 00:00:00 1970 +0000 324 +++ b/c Thu Jan 01 00:00:00 1970 +0000
268 @@ -1,1 +1,1 @@ 325 @@ -1,1 +1,1 @@
269 -conflict 326 -conflict
270 +c 327 +c
271 diff -r fb488ec29dfa -r 3d278b2f60ff newfile 328 diff -r 5907cbc074a0 -r 7e8d59a0286a newfile
272 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 329 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
273 +++ b/newfile Thu Jan 01 00:00:00 1970 +0000 330 +++ b/newfile Thu Jan 01 00:00:00 1970 +0000
274 @@ -0,0 +1,1 @@ 331 @@ -0,0 +1,1 @@
275 +new_file 332 +new_file
276 333
411 |/ () [default] draft 468 |/ () [default] draft
412 o 0:8fa14d15e168 added hgignore 469 o 0:8fa14d15e168 added hgignore
413 () [default] draft 470 () [default] draft
414 471
415 $ hg evolve --all --content-divergent 472 $ hg evolve --all --content-divergent
416 merge:[10] added a 473 merge:[5] watbar to a
417 with: [5] watbar to a 474 with: [10] added a
418 base: [1] added a 475 base: [1] added a
419 rebasing "other" content-divergent changeset 8e222f257bbf on 2228e3b74514 476 rebasing "divergent" content-divergent changeset 8e222f257bbf on 2228e3b74514
420 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 477 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
421 merge:[11] added b 478 merge:[6] added b
422 with: [6] added b 479 with: [11] added b
423 base: [2] added b 480 base: [2] added b
424 rebasing "divergent" content-divergent changeset 6eb54b5af3fb on ebb749d2ace8 481 rebasing "divergent" content-divergent changeset d5f148423c16 on 7e67dfb7ee31
425 rebasing "other" content-divergent changeset d5f148423c16 on ebb749d2ace8 482 rebasing "other" content-divergent changeset 6eb54b5af3fb on 7e67dfb7ee31
426 0 files updated, 0 files merged, 0 files removed, 0 files unresolved 483 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
427 merge:[12] added c 484 merge:[7] added c
428 with: [7] added c 485 with: [12] added c
429 base: [3] added c 486 base: [3] added c
430 rebasing "divergent" content-divergent changeset 8ed612937375 on 9437917ebe8d 487 rebasing "divergent" content-divergent changeset 3ce4be6d8e5e on 80cec1b1c90f
431 rebasing "other" content-divergent changeset 3ce4be6d8e5e on 9437917ebe8d 488 rebasing "other" content-divergent changeset 8ed612937375 on 80cec1b1c90f
432 0 files updated, 0 files merged, 0 files removed, 0 files unresolved 489 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
433 merge:[13] added d 490 merge:[8] added d
434 with: [8] added d 491 with: [13] added d
435 base: [4] added d 492 base: [4] added d
436 rebasing "divergent" content-divergent changeset d45f050514c2 on 8e574c12775a 493 rebasing "divergent" content-divergent changeset c72d2885eb51 on 7e370616fb2b
437 rebasing "other" content-divergent changeset c72d2885eb51 on 8e574c12775a 494 rebasing "other" content-divergent changeset d45f050514c2 on 7e370616fb2b
438 0 files updated, 0 files merged, 0 files removed, 0 files unresolved 495 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
439 working directory is now at ebb749d2ace8 496 working directory is now at 7e67dfb7ee31
440 497
441 $ hg glog 498 $ hg glog
442 o 24:5ab9b88fbead added d 499 o 24:469255caf534 added d
443 | () [default] draft 500 | () [default] draft
444 o 21:8e574c12775a added c 501 o 21:7e370616fb2b added c
445 | () [default] draft 502 | () [default] draft
446 o 18:9437917ebe8d added b 503 o 18:80cec1b1c90f added b
447 | () [default] draft 504 | () [default] draft
448 @ 15:ebb749d2ace8 watbar to a 505 @ 15:7e67dfb7ee31 watbar to a
449 | () [default] draft 506 | () [default] draft
450 o 9:2228e3b74514 add newfile 507 o 9:2228e3b74514 add newfile
451 | () [default] draft 508 | () [default] draft
452 o 0:8fa14d15e168 added hgignore 509 o 0:8fa14d15e168 added hgignore
453 () [default] draft 510 () [default] draft
455 when "divergent" and "other" both hit merge conflict in relocating 512 when "divergent" and "other" both hit merge conflict in relocating
456 ------------------------------------------------------------------ 513 ------------------------------------------------------------------
457 514
458 $ hg strip 14: --hidden 515 $ hg strip 14: --hidden
459 0 files updated, 0 files merged, 1 files removed, 0 files unresolved 516 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
460 saved backup bundle to $TESTTMP/stackrepo1/.hg/strip-backup/ebb749d2ace8-0585ef5a-backup.hg 517 saved backup bundle to $TESTTMP/stackrepo1/.hg/strip-backup/7e67dfb7ee31-ff5c6a6d-backup.hg
461 8 new content-divergent changesets 518 8 new content-divergent changesets
462 519
463 Prepare repo to have merge conflicts 520 Prepare repo to have merge conflicts
464 $ hg up -r "max(desc('added a'))" 521 $ hg up -r "max(desc('added a'))"
465 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 522 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
466 $ hg evolve -r . --content-divergent 523 $ hg evolve -r . --content-divergent
467 merge:[10] added a 524 merge:[5] watbar to a
468 with: [5] watbar to a 525 with: [10] added a
469 base: [1] added a 526 base: [1] added a
470 rebasing "other" content-divergent changeset 8e222f257bbf on 2228e3b74514 527 rebasing "divergent" content-divergent changeset 8e222f257bbf on 2228e3b74514
471 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 528 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
472 6 new orphan changesets 529 6 new orphan changesets
473 working directory is now at ebb749d2ace8 530 working directory is now at 7e67dfb7ee31
474 $ echo b_conflict > b 531 $ echo b_conflict > b
475 $ hg amend -A 532 $ hg amend -A
476 adding b 533 adding b
477 534
478 Let's try to evolve stack 535 Let's try to evolve stack
479 $ hg evolve --content-divergent 536 $ hg evolve --content-divergent
480 merge:[11] added b 537 merge:[6] added b
481 with: [6] added b 538 with: [11] added b
482 base: [2] added b 539 base: [2] added b
483 rebasing "divergent" content-divergent changeset 6eb54b5af3fb on 73a960350ce9 540 rebasing "divergent" content-divergent changeset d5f148423c16 on c758af982013
541 merging b
542 warning: conflicts while merging b! (edit, then use 'hg resolve --mark')
543 unresolved merge conflicts
544 (see 'hg help evolve.interrupted')
545 [1]
546
547 $ echo b > b
548 $ hg res -m
549 (no more unresolved files)
550 continue: hg evolve --continue
551 $ hg evolve --continue
552 evolving 6:d5f148423c16 "added b"
553 rebasing "other" content-divergent changeset 6eb54b5af3fb on c758af982013
484 merging b 554 merging b
485 warning: conflicts while merging b! (edit, then use 'hg resolve --mark') 555 warning: conflicts while merging b! (edit, then use 'hg resolve --mark')
486 unresolved merge conflicts 556 unresolved merge conflicts
487 (see 'hg help evolve.interrupted') 557 (see 'hg help evolve.interrupted')
488 [1] 558 [1]
491 $ hg res -m 561 $ hg res -m
492 (no more unresolved files) 562 (no more unresolved files)
493 continue: hg evolve --continue 563 continue: hg evolve --continue
494 $ hg evolve --continue 564 $ hg evolve --continue
495 evolving 11:6eb54b5af3fb "added b" 565 evolving 11:6eb54b5af3fb "added b"
496 rebasing "other" content-divergent changeset d5f148423c16 on 73a960350ce9 566 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
497 merging b 567 merge:[7] added c
498 warning: conflicts while merging b! (edit, then use 'hg resolve --mark') 568 with: [12] added c
499 unresolved merge conflicts
500 (see 'hg help evolve.interrupted')
501 [1]
502
503 $ echo b > b
504 $ hg res -m
505 (no more unresolved files)
506 continue: hg evolve --continue
507 $ hg evolve --continue
508 evolving 6:d5f148423c16 "added b"
509 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
510 merge:[12] added c
511 with: [7] added c
512 base: [3] added c 569 base: [3] added c
513 rebasing "divergent" content-divergent changeset 8ed612937375 on 1b637ec00f24 570 rebasing "divergent" content-divergent changeset 3ce4be6d8e5e on 1a79fc84e761
514 rebasing "other" content-divergent changeset 3ce4be6d8e5e on 1b637ec00f24 571 rebasing "other" content-divergent changeset 8ed612937375 on 1a79fc84e761
515 0 files updated, 0 files merged, 0 files removed, 0 files unresolved 572 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
516 merge:[13] added d 573 merge:[8] added d
517 with: [8] added d 574 with: [13] added d
518 base: [4] added d 575 base: [4] added d
519 rebasing "divergent" content-divergent changeset d45f050514c2 on fbfadbe143d8 576 rebasing "divergent" content-divergent changeset c72d2885eb51 on 6c228f1e5409
520 rebasing "other" content-divergent changeset c72d2885eb51 on fbfadbe143d8 577 rebasing "other" content-divergent changeset d45f050514c2 on 6c228f1e5409
521 0 files updated, 0 files merged, 0 files removed, 0 files unresolved 578 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
522 working directory is now at 73a960350ce9 579 working directory is now at c758af982013
523 $ hg glog 580 $ hg glog
524 o 25:bf2836f524a3 added d 581 o 25:957008d45543 added d
525 | () [default] draft 582 | () [default] draft
526 o 22:fbfadbe143d8 added c 583 o 22:6c228f1e5409 added c
527 | () [default] draft 584 | () [default] draft
528 o 19:1b637ec00f24 added b 585 o 19:1a79fc84e761 added b
529 | () [default] draft 586 | () [default] draft
530 @ 16:73a960350ce9 watbar to a 587 @ 16:c758af982013 watbar to a
531 | () [default] draft 588 | () [default] draft
532 o 9:2228e3b74514 add newfile 589 o 9:2228e3b74514 add newfile
533 | () [default] draft 590 | () [default] draft
534 o 0:8fa14d15e168 added hgignore 591 o 0:8fa14d15e168 added hgignore
535 () [default] draft 592 () [default] draft
536 593
537 when relocating "other" hit merge conflict but not "divergent" 594 when relocating "other" hit merge conflict but not "divergent"
538 -------------------------------------------------------------- 595 --------------------------------------------------------------
539 $ hg strip 14: --hidden 596 $ hg strip 14: --hidden
540 0 files updated, 0 files merged, 2 files removed, 0 files unresolved 597 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
541 saved backup bundle to $TESTTMP/stackrepo1/.hg/strip-backup/ebb749d2ace8-c2c1e937-backup.hg 598 saved backup bundle to $TESTTMP/stackrepo1/.hg/strip-backup/c758af982013-0af4fee9-backup.hg
542 8 new content-divergent changesets 599 8 new content-divergent changesets
543 600
544 Insert conflicting changes in between the stack of content-div csets 601 Insert conflicting changes in between the stack of content-div csets
545 $ hg up -r "max(desc('added b'))" 602 $ hg up -r "max(desc('added b'))"
546 2 files updated, 0 files merged, 0 files removed, 0 files unresolved 603 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
569 instability: content-divergent 626 instability: content-divergent
570 summary: added d 627 summary: added d
571 628
572 Now let's try to evolve stack 629 Now let's try to evolve stack
573 $ hg evolve --content-divergent 630 $ hg evolve --content-divergent
574 merge:[10] added a 631 merge:[5] watbar to a
575 with: [5] watbar to a 632 with: [10] added a
576 base: [1] added a 633 base: [1] added a
577 rebasing "other" content-divergent changeset 8e222f257bbf on 2228e3b74514 634 rebasing "divergent" content-divergent changeset 8e222f257bbf on 2228e3b74514
578 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 635 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
579 merge:[14] added b 636 merge:[14] added b
580 with: [17] added b 637 with: [17] added b
581 base: [2] added b 638 base: [2] added b
582 rebasing "divergent" content-divergent changeset 2a955e808c53 on ebb749d2ace8 639 rebasing "divergent" content-divergent changeset 2a955e808c53 on 7e67dfb7ee31
583 rebasing "other" content-divergent changeset 509103439e5e on ebb749d2ace8 640 rebasing "other" content-divergent changeset 509103439e5e on 7e67dfb7ee31
584 merging b 641 merging b
585 warning: conflicts while merging b! (edit, then use 'hg resolve --mark') 642 warning: conflicts while merging b! (edit, then use 'hg resolve --mark')
586 0 files updated, 0 files merged, 0 files removed, 1 files unresolved 643 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
587 4 new orphan changesets 644 4 new orphan changesets
588 unresolved merge conflicts 645 unresolved merge conflicts
670 user: test 727 user: test
671 date: Thu Jan 01 00:00:00 1970 +0000 728 date: Thu Jan 01 00:00:00 1970 +0000
672 summary: added hgignore 729 summary: added hgignore
673 730
674 $ hg evolve --content-divergent 731 $ hg evolve --content-divergent
675 merge:[10] added a 732 merge:[5] watbar to a
676 with: [5] watbar to a 733 with: [10] added a
677 base: [1] added a 734 base: [1] added a
678 rebasing "other" content-divergent changeset 8e222f257bbf on 2228e3b74514 735 rebasing "divergent" content-divergent changeset 8e222f257bbf on 2228e3b74514
679 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 736 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
680 merge:[14] added b 737 merge:[14] added b
681 with: [17] added b 738 with: [17] added b
682 base: [2] added b 739 base: [2] added b
683 rebasing "divergent" content-divergent changeset 2a955e808c53 on ebb749d2ace8 740 rebasing "divergent" content-divergent changeset 2a955e808c53 on 7e67dfb7ee31
684 rebasing "other" content-divergent changeset 509103439e5e on ebb749d2ace8 741 rebasing "other" content-divergent changeset 509103439e5e on 7e67dfb7ee31
685 merging b 742 merging b
686 warning: conflicts while merging b! (edit, then use 'hg resolve --mark') 743 warning: conflicts while merging b! (edit, then use 'hg resolve --mark')
687 0 files updated, 0 files merged, 0 files removed, 1 files unresolved 744 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
688 4 new orphan changesets 745 4 new orphan changesets
689 unresolved merge conflicts 746 unresolved merge conflicts
693 $ hg evolve --stop 750 $ hg evolve --stop
694 2 new orphan changesets 751 2 new orphan changesets
695 stopped the interrupted evolve 752 stopped the interrupted evolve
696 working directory is now at 2a955e808c53 753 working directory is now at 2a955e808c53
697 $ hg log -G 754 $ hg log -G
698 o changeset: 21:ebb749d2ace8 755 o changeset: 21:7e67dfb7ee31
699 | tag: tip 756 | tag: tip
700 | parent: 9:2228e3b74514 757 | parent: 9:2228e3b74514
701 | user: test 758 | user: test
702 | date: Thu Jan 01 00:00:00 1970 +0000 759 | date: Thu Jan 01 00:00:00 1970 +0000
703 | summary: watbar to a 760 | summary: watbar to a
741 | | | summary: added b 798 | | | summary: added b
742 | | | 799 | | |
743 +---x changeset: 10:c04ff147ef79 800 +---x changeset: 10:c04ff147ef79
744 | | user: test 801 | | user: test
745 | | date: Thu Jan 01 00:00:00 1970 +0000 802 | | date: Thu Jan 01 00:00:00 1970 +0000
746 | | obsolete: rewritten using evolve as 21:ebb749d2ace8 803 | | obsolete: rewritten using evolve as 21:7e67dfb7ee31
747 | | summary: added a 804 | | summary: added a
748 | | 805 | |
749 o | changeset: 9:2228e3b74514 806 o | changeset: 9:2228e3b74514
750 | | parent: 0:8fa14d15e168 807 | | parent: 0:8fa14d15e168
751 | | user: test 808 | | user: test
754 | | 811 | |
755 | x changeset: 5:8e222f257bbf 812 | x changeset: 5:8e222f257bbf
756 |/ parent: 0:8fa14d15e168 813 |/ parent: 0:8fa14d15e168
757 | user: test 814 | user: test
758 | date: Thu Jan 01 00:00:00 1970 +0000 815 | date: Thu Jan 01 00:00:00 1970 +0000
759 | obsolete: rebased using evolve as 21:ebb749d2ace8 816 | obsolete: rebased using evolve as 21:7e67dfb7ee31
760 | summary: watbar to a 817 | summary: watbar to a
761 | 818 |
762 o changeset: 0:8fa14d15e168 819 o changeset: 0:8fa14d15e168
763 user: test 820 user: test
764 date: Thu Jan 01 00:00:00 1970 +0000 821 date: Thu Jan 01 00:00:00 1970 +0000
765 summary: added hgignore 822 summary: added hgignore
766 823
767 $ hg obslog -r 'desc("watbar to a")' --all 824 $ hg obslog -r 'desc("watbar to a")' --all
768 o ebb749d2ace8 (21) watbar to a 825 o 7e67dfb7ee31 (21) watbar to a
769 |\ rewritten from 186bdc2cdfa2 using evolve by test (Thu Jan 01 00:00:00 1970 +0000) 826 |\ rewritten from 186bdc2cdfa2 using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
770 | | rewritten(description, content) from c04ff147ef79 using evolve by test (Thu Jan 01 00:00:00 1970 +0000) 827 | | rewritten(description, content) from c04ff147ef79 using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
771 | | 828 | |
772 x | 186bdc2cdfa2 (20) watbar to a 829 x | 186bdc2cdfa2 (20) watbar to a
773 | | rebased(parent) from 8e222f257bbf using evolve by test (Thu Jan 01 00:00:00 1970 +0000) 830 | | rebased(parent) from 8e222f257bbf using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
799 Again, let's evolve the stack 856 Again, let's evolve the stack
800 $ hg evolve --content-divergent 857 $ hg evolve --content-divergent
801 merge:[14] added b 858 merge:[14] added b
802 with: [17] added b 859 with: [17] added b
803 base: [2] added b 860 base: [2] added b
804 rebasing "divergent" content-divergent changeset 2a955e808c53 on ebb749d2ace8 861 rebasing "divergent" content-divergent changeset 2a955e808c53 on 7e67dfb7ee31
805 rebasing "other" content-divergent changeset 509103439e5e on ebb749d2ace8 862 rebasing "other" content-divergent changeset 509103439e5e on 7e67dfb7ee31
806 merging b 863 merging b
807 warning: conflicts while merging b! (edit, then use 'hg resolve --mark') 864 warning: conflicts while merging b! (edit, then use 'hg resolve --mark')
808 0 files updated, 0 files merged, 0 files removed, 1 files unresolved 865 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
809 unresolved merge conflicts 866 unresolved merge conflicts
810 (see 'hg help evolve.interrupted') 867 (see 'hg help evolve.interrupted')
816 continue: hg evolve --continue 873 continue: hg evolve --continue
817 $ hg evolve --continue 874 $ hg evolve --continue
818 merge:[15] added c 875 merge:[15] added c
819 with: [18] added c 876 with: [18] added c
820 base: [3] added c 877 base: [3] added c
821 rebasing "divergent" content-divergent changeset 48b0f803817a on 32bceb5bc91e 878 rebasing "divergent" content-divergent changeset 48b0f803817a on ddfcba2aac91
822 rebasing "other" content-divergent changeset eaf34afe4df3 on 32bceb5bc91e 879 rebasing "other" content-divergent changeset eaf34afe4df3 on ddfcba2aac91
823 0 files updated, 0 files merged, 0 files removed, 0 files unresolved 880 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
824 merge:[16] added d 881 merge:[16] added d
825 with: [19] added d 882 with: [19] added d
826 base: [4] added d 883 base: [4] added d
827 rebasing "divergent" content-divergent changeset 91c8ccb9c241 on a87eb9f90df6 884 rebasing "divergent" content-divergent changeset 91c8ccb9c241 on bb396302d792
828 rebasing "other" content-divergent changeset c351be27f199 on a87eb9f90df6 885 rebasing "other" content-divergent changeset c351be27f199 on bb396302d792
829 0 files updated, 0 files merged, 0 files removed, 0 files unresolved 886 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
830 working directory is now at 32bceb5bc91e 887 working directory is now at ddfcba2aac91
831 888
832 $ hg evolve -l 889 $ hg evolve -l
833 890
834 $ cd .. 891 $ cd ..
835 892
952 @@ -0,0 +1,1 @@ 1009 @@ -0,0 +1,1 @@
953 +a 1010 +a
954 1011
955 1012
956 $ hg evolve --content-divergent 1013 $ hg evolve --content-divergent
957 merge:[6] b 1014 merge:[3] b
958 with: [3] b 1015 with: [6] b
959 base: [1] b 1016 base: [1] b
960 rebasing "other" content-divergent changeset 5b2d00df9c4e on 980f7dc84c29 1017 rebasing "divergent" content-divergent changeset 5b2d00df9c4e on 980f7dc84c29
961 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 1018 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
962 merge:[7] c 1019 merge:[4] c
963 with: [4] c 1020 with: [7] c
964 base: [2] c 1021 base: [2] c
965 rebasing "divergent" content-divergent changeset ef4885dea3da on 6813d99f0a9d 1022 rebasing "divergent" content-divergent changeset fef59171875e on bfba946a2829
966 rebasing "other" content-divergent changeset fef59171875e on 6813d99f0a9d 1023 rebasing "other" content-divergent changeset ef4885dea3da on bfba946a2829
967 0 files updated, 0 files merged, 0 files removed, 0 files unresolved 1024 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
968 1025
969 Expected result: 1026 Expected result:
970 Changeset with description "b" only adds file "b" with content "b without typo". 1027 Changeset with description "b" only adds file "b" with content "b without typo".
971 Changeset with description "c" only adds file "c" with content "c". 1028 Changeset with description "c" only adds file "c" with content "c".
972 1029
973 $ hg glog -l2 -p 1030 $ hg glog -l2 -p
974 o 12:d5a8159e883f c 1031 o 12:a5abd6c7f9d8 c
975 | () [default] draftdiff -r 6813d99f0a9d -r d5a8159e883f c 1032 | () [default] draftdiff -r bfba946a2829 -r a5abd6c7f9d8 c
976 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1033 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000
977 | +++ b/c Thu Jan 01 00:00:00 1970 +0000 1034 | +++ b/c Thu Jan 01 00:00:00 1970 +0000
978 | @@ -0,0 +1,1 @@ 1035 | @@ -0,0 +1,1 @@
979 | +c 1036 | +c
980 | 1037 |
981 o 9:6813d99f0a9d b 1038 o 9:bfba946a2829 b
982 | () [default] draftdiff -r 980f7dc84c29 -r 6813d99f0a9d b 1039 | () [default] draftdiff -r 980f7dc84c29 -r bfba946a2829 b
983 ~ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1040 ~ --- /dev/null Thu Jan 01 00:00:00 1970 +0000
984 +++ b/b Thu Jan 01 00:00:00 1970 +0000 1041 +++ b/b Thu Jan 01 00:00:00 1970 +0000
985 @@ -0,0 +1,1 @@ 1042 @@ -0,0 +1,1 @@
986 +b without typo 1043 +b without typo
987 1044
1055 |/ () [default] draft 1112 |/ () [default] draft
1056 o 0:bde1d2b6b5e5 added base 1113 o 0:bde1d2b6b5e5 added base
1057 () [default] draft 1114 () [default] draft
1058 1115
1059 $ hg evolve -r 4+5 --content-divergent 1116 $ hg evolve -r 4+5 --content-divergent
1060 merge:[8] added foo 1117 merge:[4] added foo
1061 with: [4] added foo 1118 with: [8] added foo
1062 base: [1] added foo 1119 base: [1] added foo
1063 rebasing "other" content-divergent changeset 8a2d93492f59 on 9703820a7d5b 1120 rebasing "divergent" content-divergent changeset 8a2d93492f59 on 9703820a7d5b
1064 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 1121 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1065 merge:[9] added bar and car 1122 merge:[5] added bar and car
1066 with: [5] added bar and car 1123 with: [9] added bar and car
1067 base: [2] added bar and car 1124 base: [2] added bar and car
1068 rebasing "divergent" content-divergent changeset 7dd5b9d42ef3 on 586526ab82c5 1125 rebasing "divergent" content-divergent changeset f4ed107810a7 on 3e0693d8f69b
1069 rebasing "other" content-divergent changeset f4ed107810a7 on 586526ab82c5 1126 rebasing "other" content-divergent changeset 7dd5b9d42ef3 on 3e0693d8f69b
1070 0 files updated, 0 files merged, 0 files removed, 0 files unresolved 1127 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1071 2 new orphan changesets 1128 2 new orphan changesets
1072 working directory is now at 586526ab82c5 1129 working directory is now at 3e0693d8f69b
1073 1130
1074 $ hg glog 1131 $ hg glog
1075 o 15:e905bb19fd7e added bar and car 1132 o 15:5382795441b8 added bar and car
1076 | () [default] draft 1133 | () [default] draft
1077 @ 12:586526ab82c5 added foo 1134 @ 12:3e0693d8f69b added foo
1078 | () [default] draft 1135 | () [default] draft
1079 | * 10:9a1f460df8b5 added dar 1136 | * 10:9a1f460df8b5 added dar
1080 | | () [default] draft 1137 | | () [default] draft
1081 | x 9:7dd5b9d42ef3 added bar and car 1138 | x 9:7dd5b9d42ef3 added bar and car
1082 | | () [default] draft 1139 | | () [default] draft