diff -r 3e717c9376fc -r 308aaeb956e2 mercurial/cmdutil.py --- 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()