mercurial/cmdutil.py
changeset 28638 44319097e7b9
parent 28630 bf35644b9f3a
child 28815 44611ad4fbd9
--- a/mercurial/cmdutil.py	Sun Mar 20 18:24:59 2016 -0400
+++ b/mercurial/cmdutil.py	Sun Mar 20 21:08:17 2016 -0400
@@ -207,6 +207,17 @@
             dopatch = fp.tell()
             fp.seek(0)
 
+            # 2.5 optionally review / modify patch in text editor
+            if opts.get('review', False):
+                patchtext = (crecordmod.diffhelptext
+                             + crecordmod.patchhelptext
+                             + fp.read())
+                reviewedpatch = ui.edit(patchtext, "",
+                                        extra={"suffix": ".diff"})
+                fp.truncate(0)
+                fp.write(reviewedpatch)
+                fp.seek(0)
+
             [os.unlink(repo.wjoin(c)) for c in newlyaddedandmodifiedfiles]
             # 3a. apply filtered patch to clean repo  (clean)
             if backups: