comparison tests/test-fold.t @ 5989:056033a7689f stable

fold: make sure to save commit messages in last-message.txt on rewrites
author Anton Shestakov <av6@dwimlabs.net>
date Thu, 29 Jul 2021 22:45:51 +0300
parents a1dad44fe3da
children 43c4db536990 01154958e0cf
comparison
equal deleted inserted replaced
5986:5578f21b43c1 5989:056033a7689f
444 > --config experimental.evolution.allowdivergence=yes 444 > --config experimental.evolution.allowdivergence=yes
445 2 new content-divergent changesets 445 2 new content-divergent changesets
446 2 changesets folded 446 2 changesets folded
447 447
448 $ cd .. 448 $ cd ..
449
450 Saving the last user-edited message in last-message.txt
451 https://bz.mercurial-scm.org/show_bug.cgi?id=6549
452
453 $ hg init issue6549
454 $ cd issue6549
455
456 $ echo A > foo
457 $ hg ci -qAm A
458 $ echo B > foo
459 $ hg ci -m B
460
461 $ cat > editor.sh << 'EOF'
462 > echo 'Big commit message that was crafted with care.' > "$1"
463 > echo '' >> "$1"
464 > echo 'It would be a shame if something happened to it.' >> "$1"
465 > EOF
466 $ HGEDITOR="sh ./editor.sh" hg fold --exact --rev 'all()'
467 2 changesets folded
468 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
469
470 $ hg glog
471 @ 2: Big commit message that was crafted with care.
472
473 It would be a shame if something happened to it.
474 $ cat .hg/last-message.txt
475 Big commit message that was crafted with care.
476
477 It would be a shame if something happened to it.
478
479 $ cd ..