comparison tests/test-prev-next.t @ 3813:27e7ed2d13a6 stable

next-prev: always respect the --merge flag An earlier bug fix series which started respecting commands.update.check introduced a bug in which --merge was not respected sometimes. This patch fixes that behavior by passing updatecheck as 'none' to hg.updatetotally() if --merge is passed which is similar to what `hg update` does.
author Pulkit Goyal <7895pulkit@gmail.com>
date Fri, 08 Jun 2018 17:36:28 +0530
parents 25dfa95c37fd
children 5ca297e78f2c 503ae2689df8
comparison
equal deleted inserted replaced
3812:25dfa95c37fd 3813:27e7ed2d13a6
444 444
445 XXX: yes we want --merge and we passed that! 445 XXX: yes we want --merge and we passed that!
446 $ echo hi > bar 446 $ echo hi > bar
447 $ echo bar >> bar 447 $ echo bar >> bar
448 $ hg next --merge 448 $ hg next --merge
449 abort: conflicting changes 449 merging bar
450 (do you want --merge?) 450 warning: conflicts while merging bar! (edit, then use 'hg resolve --mark')
451 [255] 451 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
452 use 'hg resolve' to retry unresolved file merges
453 [2] added bar
454
455 $ echo babar > bar
456 $ hg resolve -m
457 (no more unresolved files)
452 458
453 Testing --merge works with other values of commands.update.check also 459 Testing --merge works with other values of commands.update.check also
454 460
455 XXX: things are broken! 461 XXX: things are broken!
456 $ hg prev --merge --config commands.update.check=abort 462 $ hg prev --merge --config commands.update.check=abort
457 abort: uncommitted changes 463 local [working copy] changed bar which other [destination] deleted
458 (do you want --merge?) 464 use (c)hanged version, (d)elete, or leave (u)nresolved?
459 [255] 465 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
466 use 'hg resolve' to retry unresolved file merges
467 [1] added foo
460 468
461 $ hg revert --all 469 $ hg revert --all
462 forgetting bar 470 forgetting bar
463 reverting wat 471 reverting wat
472 $ hg resolve -m
473 (no more unresolved files)
464 474
465 $ echo bar > bar 475 $ echo bar > bar
466 $ hg add bar 476 $ hg add bar
467 477
468 $ hg next --merge --config commands.update.check=abort 478 $ hg next --merge --config commands.update.check=abort
469 abort: uncommitted changes 479 merging bar
470 (do you want --merge?) 480 warning: conflicts while merging bar! (edit, then use 'hg resolve --mark')
471 [255] 481 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
482 use 'hg resolve' to retry unresolved file merges
483 [2] added bar