mercurial/cmdutil.py
changeset 21417 308aaeb956e2
parent 21415 0b5d6c062774
child 21419 272785489ed3
--- a/mercurial/cmdutil.py	Sun May 11 00:49:36 2014 +0900
+++ b/mercurial/cmdutil.py	Sun May 11 00:49:36 2014 +0900
@@ -569,9 +569,7 @@
     tmpname, message, user, date, branch, nodeid, p1, p2 = \
         patch.extract(ui, hunk)
 
-    editor = commiteditor
-    if opts.get('edit'):
-        editor = commitforceeditor
+    editor = getcommiteditor(**opts)
     update = not opts.get('bypass')
     strip = opts["strip"]
     sim = float(opts.get('similarity') or 0)
@@ -660,7 +658,7 @@
                                             opts.get('user') or user,
                                             opts.get('date') or date,
                                             branch, files, store,
-                                            editor=commiteditor)
+                                            editor=getcommiteditor())
                 n = memctx.commit()
             finally:
                 store.close()