eric7/Plugins/VcsPlugins/vcsMercurial/HisteditExtension/histedit.py

branch
eric7
changeset 8860
49dbec337315
parent 8318
962bce857696
child 8881
54e42bc2437a
--- a/eric7/Plugins/VcsPlugins/vcsMercurial/HisteditExtension/histedit.py	Sun Dec 26 18:49:26 2021 +0100
+++ b/eric7/Plugins/VcsPlugins/vcsMercurial/HisteditExtension/histedit.py	Mon Dec 27 18:15:32 2021 +0100
@@ -47,8 +47,12 @@
         if dlg.exec() == QDialog.DialogCode.Accepted:
             rev, force, keep = dlg.getData()
             
+            editor = os.path.join(
+                os.path.dirname(__file__), "HgHisteditEditor.py")
+            
             args = self.vcs.initCommand("histedit")
             args.append("-v")
+            args.extend(["--config", f"ui.editor={sys.executable} {editor}"])
             if keep:
                 args.append("--keep")
             if rev:
@@ -59,9 +63,10 @@
                     args.append("--rev")
                 args.append(rev)
             
-            editor = os.path.join(
-                os.path.dirname(__file__), "HgHisteditEditor.py")
-            env = {"HGEDITOR": "{0} {1}".format(sys.executable, editor)}
+            env = {
+                "HGEDITOR": "{0} {1}".format(sys.executable, editor),
+                "EDITOR": "{0} {1}".format(sys.executable, editor),
+            }
             
             dia = HgDialog(
                 self.tr("Starting histedit session"),

eric ide

mercurial