diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -3208,7 +3208,12 @@ repo.dirstate.write(tr) pending = tr and tr.writepending() and repo.root - editortext = repo.ui.edit(committext, ctx.user(), ctx.extra(), + # provide an unambigious path suffix so editors can provide special support + # for authoring Hg commit messages + extra = ctx.extra() + extra['suffix'] = '.hgcommit.txt' + + editortext = repo.ui.edit(committext, ctx.user(), extra, editform=editform, pending=pending, repopath=repo.path) text = editortext