diff -r dbeeed55df08 -r 5fb53279f2df eric6/Plugins/VcsPlugins/vcsMercurial/CloseheadExtension/HgCloseHeadSelectionDialog.py --- a/eric6/Plugins/VcsPlugins/vcsMercurial/CloseheadExtension/HgCloseHeadSelectionDialog.py Wed Jan 08 19:13:57 2020 +0100 +++ b/eric6/Plugins/VcsPlugins/vcsMercurial/CloseheadExtension/HgCloseHeadSelectionDialog.py Mon Jan 13 19:23:08 2020 +0100 @@ -7,10 +7,7 @@ Module implementing a dialog to select the heads to be closed. """ - -import os - -from PyQt5.QtCore import pyqtSlot, QProcess +from PyQt5.QtCore import pyqtSlot from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QTreeWidgetItem from .Ui_HgCloseHeadSelectionDialog import Ui_HgCloseHeadSelectionDialog @@ -59,25 +56,7 @@ output = "" client = vcs.getClient() - if client is None: - # find the root of the repo - repodir = self.splitPath(ppath)[0] - while not os.path.isdir(os.path.join(repodir, self.adminDir)): - repodir = os.path.dirname(repodir) - if os.path.splitdrive(repodir)[1] == os.sep: - return [] - - process = QProcess() - process.setWorkingDirectory(repodir) - process.start('hg', args) - procStarted = process.waitForStarted(5000) - if procStarted: - finished = process.waitForFinished(30000) - if finished and process.exitCode() == 0: - output = str(process.readAllStandardOutput(), - self.getEncoding(), 'replace') - else: - output, error = client.runcommand(args) + output, error = client.runcommand(args) heads = [] if output: