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

branch
eric7
changeset 9624
b47dfa7a137d
parent 9473
3f23dbf37dbe
child 9653
e67609152c5e
--- a/src/eric7/Plugins/VcsPlugins/vcsMercurial/HisteditExtension/histedit.py	Sun Dec 18 14:19:10 2022 +0100
+++ b/src/eric7/Plugins/VcsPlugins/vcsMercurial/HisteditExtension/histedit.py	Sun Dec 18 19:33:46 2022 +0100
@@ -11,7 +11,7 @@
 
 from PyQt6.QtWidgets import QDialog
 
-from eric7 import Globals
+from eric7.SystemUtilities import PythonUtilities
 
 from ..HgDialog import HgDialog
 from ..HgExtension import HgExtension
@@ -57,7 +57,10 @@
             args = self.vcs.initCommand("histedit")
             args.append("-v")
             args.extend(
-                ["--config", f"ui.editor={Globals.getPythonExecutable()} {editor}"]
+                [
+                    "--config",
+                    f"ui.editor={PythonUtilities.getPythonExecutable()} {editor}",
+                ]
             )
             if keep:
                 args.append("--keep")
@@ -70,8 +73,12 @@
                 args.append(rev)
 
             env = {
-                "HGEDITOR": "{0} {1}".format(Globals.getPythonExecutable(), editor),
-                "EDITOR": "{0} {1}".format(Globals.getPythonExecutable(), editor),
+                "HGEDITOR": "{0} {1}".format(
+                    PythonUtilities.getPythonExecutable(), editor
+                ),
+                "EDITOR": "{0} {1}".format(
+                    PythonUtilities.getPythonExecutable(), editor
+                ),
             }
 
             dia = HgDialog(
@@ -96,7 +103,9 @@
         args.append("-v")
 
         editor = os.path.join(os.path.dirname(__file__), "HgHisteditEditor.py")
-        env = {"HGEDITOR": "{0} {1}".format(Globals.getPythonExecutable(), editor)}
+        env = {
+            "HGEDITOR": "{0} {1}".format(PythonUtilities.getPythonExecutable(), editor)
+        }
 
         dia = HgDialog(self.tr("Continue histedit session"), self.vcs, useClient=False)
         res = dia.startProcess(args, environment=env)
@@ -120,7 +129,9 @@
         args.append("-v")
 
         editor = os.path.join(os.path.dirname(__file__), "HgHisteditEditor.py")
-        env = {"HGEDITOR": "{0} {1}".format(Globals.getPythonExecutable(), editor)}
+        env = {
+            "HGEDITOR": "{0} {1}".format(PythonUtilities.getPythonExecutable(), editor)
+        }
 
         dia = HgDialog(self.tr("Abort histedit session"), self.vcs, useClient=False)
         res = dia.startProcess(args, environment=env)
@@ -143,7 +154,9 @@
         args.append("-v")
 
         editor = os.path.join(os.path.dirname(__file__), "HgHisteditEditor.py")
-        env = {"HGEDITOR": "{0} {1}".format(Globals.getPythonExecutable(), editor)}
+        env = {
+            "HGEDITOR": "{0} {1}".format(PythonUtilities.getPythonExecutable(), editor)
+        }
 
         dia = HgDialog(self.tr("Edit Plan"), self.vcs, useClient=False)
         res = dia.startProcess(args, environment=env)

eric ide

mercurial