Mercurial: implemented changes to get 'histedit' working again. eric7

Mon, 27 Dec 2021 18:15:32 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 27 Dec 2021 18:15:32 +0100
branch
eric7
changeset 8860
49dbec337315
parent 8859
64252c7bfb87
child 8861
840f47364b20

Mercurial: implemented changes to get 'histedit' working again.

eric7/Plugins/VcsPlugins/vcsMercurial/HisteditExtension/HgHisteditCommitEditor.py file | annotate | diff | comparison | revisions
eric7/Plugins/VcsPlugins/vcsMercurial/HisteditExtension/histedit.py file | annotate | diff | comparison | revisions
--- a/eric7/Plugins/VcsPlugins/vcsMercurial/HisteditExtension/HgHisteditCommitEditor.py	Sun Dec 26 18:49:26 2021 +0100
+++ b/eric7/Plugins/VcsPlugins/vcsMercurial/HisteditExtension/HgHisteditCommitEditor.py	Mon Dec 27 18:15:32 2021 +0100
@@ -10,7 +10,6 @@
 from PyQt6.QtCore import pyqtSlot, QCoreApplication
 from PyQt6.QtWidgets import QDialog
 
-from EricWidgets.EricApplication import ericApp
 from EricWidgets import EricMessageBox
 
 from Ui_HgHisteditCommitEditor import Ui_HgHisteditCommitEditor
@@ -35,12 +34,6 @@
         super().__init__(parent)
         self.setupUi(self)
         
-        project = ericApp().getObject("Project")
-        pwl, pel = project.getProjectDictionaries()
-        language = project.getProjectSpellLanguage()
-        self.messageEdit.setLanguageWithPWL(
-            language, pwl or None, pel or None)
-        
         self.__fileName = fileName
         self.__readFile()
         
--- 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