hgext/mq.py
changeset 21423 7d408720453d
parent 21422 edc6ced48d2d
child 21713 7a51bced398b
--- a/hgext/mq.py	Sun May 11 00:49:36 2014 +0900
+++ b/hgext/mq.py	Sun May 11 00:49:36 2014 +0900
@@ -1656,17 +1656,18 @@
                 # might be nice to attempt to roll back strip after this
 
                 defaultmsg = "[mq]: %s" % patchfn
-                editor = False
+                editor = cmdutil.getcommiteditor()
                 if edit:
-                    def desceditor(repo, ctx, subs):
-                        desc = self.ui.edit(ctx.description() + "\n",
-                                            ctx.user())
+                    def finishdesc(desc):
                         if desc.rstrip():
                             ph.setmessage(desc)
                             return desc
                         return defaultmsg
+                    # i18n: this message is shown in editor with "HG: " prefix
+                    extramsg = _('Leave message empty to use default message.')
+                    editor = cmdutil.getcommiteditor(finishdesc=finishdesc,
+                                                     extramsg=extramsg)
                     message = msg or "\n".join(ph.message)
-                    editor = desceditor
                 elif not msg:
                     if not ph.message:
                         message = defaultmsg