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

branch
eric7
changeset 9016
6f079c524e99
parent 8881
54e42bc2437a
--- a/eric7/Plugins/VcsPlugins/vcsMercurial/HisteditExtension/histedit.py	Sun Apr 03 17:23:31 2022 +0200
+++ b/eric7/Plugins/VcsPlugins/vcsMercurial/HisteditExtension/histedit.py	Mon Apr 04 17:43:43 2022 +0200
@@ -8,13 +8,14 @@
 """
 
 import os
-import sys
 
 from PyQt6.QtWidgets import QDialog
 
 from ..HgExtension import HgExtension
 from ..HgDialog import HgDialog
 
+import Globals
+
 
 class Histedit(HgExtension):
     """
@@ -52,7 +53,10 @@
             
             args = self.vcs.initCommand("histedit")
             args.append("-v")
-            args.extend(["--config", f"ui.editor={sys.executable} {editor}"])
+            args.extend([
+                "--config",
+                f"ui.editor={Globals.getPythonExecutable()} {editor}"
+            ])
             if keep:
                 args.append("--keep")
             if rev:
@@ -64,8 +68,10 @@
                 args.append(rev)
             
             env = {
-                "HGEDITOR": "{0} {1}".format(sys.executable, editor),
-                "EDITOR": "{0} {1}".format(sys.executable, editor),
+                "HGEDITOR": "{0} {1}".format(
+                    Globals.getPythonExecutable(), editor),
+                "EDITOR": "{0} {1}".format(
+                    Globals.getPythonExecutable(), editor),
             }
             
             dia = HgDialog(
@@ -92,7 +98,8 @@
         
         editor = os.path.join(
             os.path.dirname(__file__), "HgHisteditEditor.py")
-        env = {"HGEDITOR": "{0} {1}".format(sys.executable, editor)}
+        env = {"HGEDITOR": "{0} {1}".format(
+            Globals.getPythonExecutable(), editor)}
         
         dia = HgDialog(
             self.tr("Continue histedit session"),
@@ -120,7 +127,8 @@
         
         editor = os.path.join(
             os.path.dirname(__file__), "HgHisteditEditor.py")
-        env = {"HGEDITOR": "{0} {1}".format(sys.executable, editor)}
+        env = {"HGEDITOR": "{0} {1}".format(
+            Globals.getPythonExecutable(), editor)}
         
         dia = HgDialog(
             self.tr("Abort histedit session"),
@@ -147,7 +155,8 @@
         
         editor = os.path.join(
             os.path.dirname(__file__), "HgHisteditEditor.py")
-        env = {"HGEDITOR": "{0} {1}".format(sys.executable, editor)}
+        env = {"HGEDITOR": "{0} {1}".format(
+            Globals.getPythonExecutable(), editor)}
         
         dia = HgDialog(
             self.tr("Edit Plan"),

eric ide

mercurial