mercurial/cmdutil.py
changeset 21405 dcf20f244c2a
parent 21241 244b177a152e
child 21415 0b5d6c062774
--- a/mercurial/cmdutil.py	Wed May 14 12:49:55 2014 -0700
+++ b/mercurial/cmdutil.py	Sun May 11 00:49:35 2014 +0900
@@ -109,6 +109,13 @@
                              (logfile, inst.strerror))
     return message
 
+def getcommiteditor(edit=False, **opts):
+    """get appropriate commit message editor according to '--edit' option"""
+    if edit:
+        return commitforceeditor
+    else:
+        return commiteditor
+
 def loglimit(opts):
     """get the log limit according to option -l/--limit"""
     limit = opts.get('limit')