eric6/Plugins/VcsPlugins/vcsMercurial/HgServeDialog.py

changeset 8288
809d5d5ac2ba
parent 8234
fcb6b4b96274
--- a/eric6/Plugins/VcsPlugins/vcsMercurial/HgServeDialog.py	Mon May 03 19:58:28 2021 +0200
+++ b/eric6/Plugins/VcsPlugins/vcsMercurial/HgServeDialog.py	Tue May 04 19:30:25 2021 +0200
@@ -20,8 +20,9 @@
 from E5Gui.E5MainWindow import E5MainWindow
 
 import UI.PixmapCache
+import Preferences
 
-import Preferences
+from .HgUtilities import getHgExecutable
 
 
 class HgServeDialog(E5MainWindow):
@@ -121,6 +122,8 @@
         port = self.__portSpin.value()
         style = self.__styleCombo.currentText()
         
+        exe = getHgExecutable()
+        
         args = self.vcs.initCommand("serve")
         args.append("-v")
         args.append("--port")
@@ -130,7 +133,7 @@
         
         self.process.setWorkingDirectory(self.__repoPath)
         
-        self.process.start('hg', args)
+        self.process.start(exe, args)
         procStarted = self.process.waitForStarted(5000)
         if procStarted:
             self.__startAct.setEnabled(False)
@@ -147,7 +150,7 @@
                 self.tr(
                     'The process {0} could not be started. '
                     'Ensure, that it is in the search path.'
-                ).format('hg'))
+                ).format(exe))
     
     def __stopServer(self):
         """

eric ide

mercurial