mercurial/patch.py
changeset 25483 fb04372d7b38
parent 25424 69609f43c752
child 25631 2748bf78a5bf
--- a/mercurial/patch.py	Sun Jun 07 18:11:23 2015 -0700
+++ b/mercurial/patch.py	Fri Jun 05 13:31:18 2015 -0700
@@ -1023,9 +1023,11 @@
                     f.close()
                     # Start the editor and wait for it to complete
                     editor = ui.geteditor()
-                    ui.system("%s \"%s\"" % (editor, patchfn),
-                              environ={'HGUSER': ui.username()},
-                              onerr=util.Abort, errprefix=_("edit failed"))
+                    ret = ui.system("%s \"%s\"" % (editor, patchfn),
+                                    environ={'HGUSER': ui.username()})
+                    if ret != 0:
+                        ui.warn(_("editor exited with exit code %d\n") % ret)
+                        continue
                     # Remove comment lines
                     patchfp = open(patchfn)
                     ncpatchfp = cStringIO.StringIO()