mercurial/localrepo.py
branchstable
changeset 49148 db3f8e5cc965
parent 48793 6e559391f96e
child 49164 a932cad26d37
--- a/mercurial/localrepo.py	Thu Apr 21 15:10:57 2022 +0200
+++ b/mercurial/localrepo.py	Wed Apr 27 15:47:57 2022 +0200
@@ -3176,7 +3176,7 @@
             # Save commit message in case this transaction gets rolled back
             # (e.g. by a pretxncommit hook).  Leave the content alone on
             # the assumption that the user will use the same editor again.
-            msgfn = self.savecommitmessage(cctx._text)
+            msg_path = self.savecommitmessage(cctx._text)
 
             # commit subs and write new state
             if subs:
@@ -3206,13 +3206,14 @@
             except:  # re-raises
                 if edited:
                     self.ui.write(
-                        _(b'note: commit message saved in %s\n') % msgfn
+                        _(b'note: commit message saved in %s\n') % msg_path
                     )
                     self.ui.write(
                         _(
                             b"note: use 'hg commit --logfile "
-                            b".hg/last-message.txt --edit' to reuse it\n"
+                            b"%s --edit' to reuse it\n"
                         )
+                        % msg_path
                     )
                 raise