cmdutil: add tmpdir parament to ui.edit calls
authorSean Farley <sean@farley.io>
Mon, 16 Jan 2017 21:15:21 -0800
changeset 30836 565c07036066
parent 30835 bcad61a1f9a7
child 30837 f59ab1b752bd
cmdutil: add tmpdir parament to ui.edit calls
mercurial/cmdutil.py
--- a/mercurial/cmdutil.py	Mon Jan 16 21:05:22 2017 -0800
+++ b/mercurial/cmdutil.py	Mon Jan 16 21:15:21 2017 -0800
@@ -231,7 +231,8 @@
                              + crecordmod.patchhelptext
                              + fp.read())
                 reviewedpatch = ui.edit(patchtext, "",
-                                        extra={"suffix": ".diff"})
+                                        extra={"suffix": ".diff"},
+                                        tmpdir=repo.path)
                 fp.truncate(0)
                 fp.write(reviewedpatch)
                 fp.seek(0)
@@ -2780,7 +2781,8 @@
     pending = tr and tr.writepending() and repo.root
 
     editortext = repo.ui.edit(committext, ctx.user(), ctx.extra(),
-                        editform=editform, pending=pending)
+                              editform=editform, pending=pending,
+                              tmpdir=repo.path)
     text = editortext
 
     # strip away anything below this special string (used for editors that want