mercurial/cmdutil.py
changeset 22278 ffaaa80fa724
parent 22260 2229d757802d
child 22296 650b5b6e75ed
--- a/mercurial/cmdutil.py	Sat Aug 23 23:03:50 2014 +0900
+++ b/mercurial/cmdutil.py	Sat Aug 23 23:03:50 2014 +0900
@@ -688,7 +688,10 @@
                 else:
                     m = scmutil.matchfiles(repo, files or [])
                 editform = mergeeditform(repo[None], 'import.normal')
-                editor = getcommiteditor(editform=editform, **opts)
+                if opts.get('exact'):
+                    editor = None
+                else:
+                    editor = getcommiteditor(editform=editform, **opts)
                 n = repo.commit(message, opts.get('user') or user,
                                 opts.get('date') or date, match=m,
                                 editor=editor, force=partial)
@@ -705,7 +708,10 @@
                                     files, eolmode=None)
                 except patch.PatchError, e:
                     raise util.Abort(str(e))
-                editor = getcommiteditor(editform='import.bypass')
+                if opts.get('exact'):
+                    editor = None
+                else:
+                    editor = getcommiteditor(editform='import.bypass')
                 memctx = context.makememctx(repo, (p1.node(), p2.node()),
                                             message,
                                             opts.get('user') or user,