--- a/mercurial/cmdutil.py Thu Jun 26 01:20:25 2014 +0200
+++ b/mercurial/cmdutil.py Fri Jul 18 23:15:28 2014 -0500
@@ -2171,6 +2171,8 @@
return commitforceeditor(repo, ctx, subs)
def commitforceeditor(repo, ctx, subs, finishdesc=None, extramsg=None):
+ if not extramsg:
+ extramsg = _("Leave message empty to abort commit.")
committext = buildcommittext(repo, ctx, subs, extramsg)
# run editor in the repository root
@@ -2196,10 +2198,7 @@
edittext.append("") # Empty line between message and comments.
edittext.append(_("HG: Enter commit message."
" Lines beginning with 'HG:' are removed."))
- if extramsg:
- edittext.append("HG: %s" % extramsg)
- else:
- edittext.append(_("HG: Leave message empty to abort commit."))
+ edittext.append("HG: %s" % extramsg)
edittext.append("HG: --")
edittext.append(_("HG: user: %s") % ctx.user())
if ctx.p2():