eric6/Plugins/VcsPlugins/vcsMercurial/HgClient.py

changeset 8288
809d5d5ac2ba
parent 8234
fcb6b4b96274
child 8320
85af703a45b7
equal deleted inserted replaced
8287:30eb7bc13d63 8288:809d5d5ac2ba
13 from PyQt5.QtCore import ( 13 from PyQt5.QtCore import (
14 QProcess, QObject, QByteArray, QCoreApplication, QThread 14 QProcess, QObject, QByteArray, QCoreApplication, QThread
15 ) 15 )
16 from PyQt5.QtWidgets import QDialog 16 from PyQt5.QtWidgets import QDialog
17 17
18 from .HgUtilities import prepareProcess 18 from .HgUtilities import prepareProcess, getHgExecutable
19 19
20 20
21 class HgClient(QObject): 21 class HgClient(QObject):
22 """ 22 """
23 Class implementing the Mercurial command server interface. 23 Class implementing the Mercurial command server interface.
83 # connect signals 83 # connect signals
84 self.__server.finished.connect(self.__serverFinished) 84 self.__server.finished.connect(self.__serverFinished)
85 85
86 prepareProcess(self.__server, self.__encoding) 86 prepareProcess(self.__server, self.__encoding)
87 87
88 self.__server.start('hg', self.__serverArgs) 88 exe = getHgExecutable()
89 self.__server.start(exe, self.__serverArgs)
89 serverStarted = self.__server.waitForStarted(15000) 90 serverStarted = self.__server.waitForStarted(15000)
90 if not serverStarted: 91 if not serverStarted:
91 return False, self.tr( 92 return False, self.tr(
92 'The process {0} could not be started. ' 93 'The process {0} could not be started. '
93 'Ensure, that it is in the search path.' 94 'Ensure, that it is in the search path.'
94 ).format('hg') 95 ).format(exe)
95 96
96 self.__server.setReadChannel(QProcess.ProcessChannel.StandardOutput) 97 self.__server.setReadChannel(QProcess.ProcessChannel.StandardOutput)
97 ok, error = self.__readHello() 98 ok, error = self.__readHello()
98 self.__started = ok 99 self.__started = ok
99 return ok, error 100 return ok, error

eric ide

mercurial