comparison tests/test-obsolete.t @ 44545:bd7b2c8d06cc

pull: add `--confirm` flag to confirm before writing changes This introduces a new flag to pull command `--confirm` and also a config option named `pull.confirm` which if used will prompt user describing changes which are pulled and asking whether to accept them or not. Differential Revision: https://phab.mercurial-scm.org/D8200
author Pulkit Goyal <7895pulkit@gmail.com>
date Sat, 29 Feb 2020 12:58:38 +0530
parents 34a46d48d24e
children 48b99af7b4b3
comparison
equal deleted inserted replaced
44544:13da36d77a3f 44545:bd7b2c8d06cc
375 0:1f0dee641bb7 (public) [ ] add a 375 0:1f0dee641bb7 (public) [ ] add a
376 1:7c3bad9141dc (public) [ ] add b 376 1:7c3bad9141dc (public) [ ] add b
377 2:245bde4270cd (public) [ ] add original_c 377 2:245bde4270cd (public) [ ] add original_c
378 6:6f9641995072 (draft) [tip ] add n3w_3_c 378 6:6f9641995072 (draft) [tip ] add n3w_3_c
379 379
380 Try to pull markers 380 Try to pull markers while testing pull --confirm
381 (extinct changeset are excluded but marker are pushed) 381 (extinct changeset are excluded but marker are pushed)
382 382
383 $ hg pull ../tmpb 383 $ hg pull ../tmpb --confirm --config ui.interactive=true <<EOF
384 > n
385 > EOF
384 pulling from ../tmpb 386 pulling from ../tmpb
385 requesting all changes 387 requesting all changes
386 adding changesets 388 adding changesets
387 adding manifests 389 adding manifests
388 adding file changes 390 adding file changes
391 adding 4 changesets with 4 changes to 4 files (+1 heads)
392 5 new obsolescence markers
393 new changesets 1f0dee641bb7:6f9641995072 (1 drafts)
394 accept incoming changes (yn)? n
395 transaction abort!
396 rollback completed
397 abort: user aborted
398 [255]
399 $ HGPLAIN=1 hg pull ../tmpb --confirm --config ui.interactive=true <<EOF
400 > n
401 > EOF
402 pulling from ../tmpb
403 requesting all changes
404 adding changesets
405 adding manifests
406 adding file changes
407 adding 4 changesets with 4 changes to 4 files (+1 heads)
408 5 new obsolescence markers
409 new changesets 1f0dee641bb7:6f9641995072 (1 drafts)
410 accept incoming changes (yn)? n
411 transaction abort!
412 rollback completed
413 abort: user aborted
414 [255]
415 $ hg pull ../tmpb --confirm --config ui.interactive=true <<EOF
416 > y
417 > EOF
418 pulling from ../tmpb
419 requesting all changes
420 adding changesets
421 adding manifests
422 adding file changes
423 adding 4 changesets with 4 changes to 4 files (+1 heads)
424 5 new obsolescence markers
425 new changesets 1f0dee641bb7:6f9641995072 (1 drafts)
426 accept incoming changes (yn)? y
389 added 4 changesets with 4 changes to 4 files (+1 heads) 427 added 4 changesets with 4 changes to 4 files (+1 heads)
390 5 new obsolescence markers 428 5 new obsolescence markers
391 new changesets 1f0dee641bb7:6f9641995072 (1 drafts) 429 new changesets 1f0dee641bb7:6f9641995072 (1 drafts)
392 (run 'hg heads' to see heads, 'hg merge' to merge) 430 (run 'hg heads' to see heads, 'hg merge' to merge)
393 $ hg debugobsolete 431 $ hg debugobsolete