hgext/fetch.py
changeset 21406 288a793c3167
parent 21247 b1e64c6720d8
child 21952 3838b910fa6b
--- a/hgext/fetch.py	Sun May 11 00:49:35 2014 +0900
+++ b/hgext/fetch.py	Sun May 11 00:49:35 2014 +0900
@@ -142,10 +142,9 @@
             message = (cmdutil.logmessage(ui, opts) or
                        ('Automated merge with %s' %
                         util.removeauth(other.url())))
-            editor = cmdutil.commiteditor
-            if opts.get('force_editor') or opts.get('edit'):
-                editor = cmdutil.commitforceeditor
-            n = repo.commit(message, opts['user'], opts['date'], editor=editor)
+            editopt = opts.get('edit') or opts.get('force_editor')
+            n = repo.commit(message, opts['user'], opts['date'],
+                            editor=cmdutil.getcommiteditor(edit=editopt))
             ui.status(_('new changeset %d:%s merges remote changes '
                         'with local\n') % (repo.changelog.rev(n),
                                            short(n)))