diff tests/test-fold.t @ 6018:01154958e0cf

branching: merge stable into default
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 13 Aug 2021 20:25:11 +0200
parents 65d4e47d7f26 056033a7689f
children 1a13ac9ef30a 442771901e01
line wrap: on
line diff
--- a/tests/test-fold.t	Thu Jul 01 15:47:45 2021 +0300
+++ b/tests/test-fold.t	Fri Aug 13 20:25:11 2021 +0200
@@ -442,3 +442,34 @@
   2 changesets folded
 
   $ cd ..
+
+Saving the last user-edited message in last-message.txt
+https://bz.mercurial-scm.org/show_bug.cgi?id=6549
+
+  $ hg init issue6549
+  $ cd issue6549
+
+  $ echo A > foo
+  $ hg ci -qAm A
+  $ echo B > foo
+  $ hg ci -m B
+
+  $ cat > editor.sh << 'EOF'
+  > echo 'Big commit message that was crafted with care.' > "$1"
+  > echo '' >> "$1"
+  > echo 'It would be a shame if something happened to it.' >> "$1"
+  > EOF
+  $ HGEDITOR="sh ./editor.sh" hg fold --exact --rev 'all()'
+  2 changesets folded
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+
+  $ hg glog
+  @  2: Big commit message that was crafted with care.
+  
+     It would be a shame if something happened to it.
+  $ cat .hg/last-message.txt
+  Big commit message that was crafted with care.
+  
+  It would be a shame if something happened to it.
+
+  $ cd ..