mercurial/cmdutil.py
changeset 26750 9f9ec4abe700
parent 26746 3c1d297fe929
child 26781 1aee2ab0f902
--- a/mercurial/cmdutil.py	Sat Oct 17 01:15:34 2015 +0900
+++ b/mercurial/cmdutil.py	Sat Oct 17 01:15:34 2015 +0900
@@ -2715,9 +2715,14 @@
     # run editor in the repository root
     olddir = os.getcwd()
     os.chdir(repo.root)
+
+    # make in-memory changes visible to external process
+    tr = repo.currenttransaction()
+    repo.dirstate.write(tr)
+    pending = tr and tr.writepending() and repo.root
+
     editortext = repo.ui.edit(committext, ctx.user(), ctx.extra(),
-                              editform=editform)
-
+                        editform=editform, pending=pending)
     text = re.sub("(?m)^HG:.*(\n|$)", "", editortext)
     os.chdir(olddir)