src/eric7/Plugins/VcsPlugins/vcsGit/GitSubmodulesStatusDialog.py

branch
eric7
changeset 9616
13aa04c979d7
parent 9576
be9f8e7e42e0
child 9653
e67609152c5e
equal deleted inserted replaced
9615:fbb3616f6bd3 9616:13aa04c979d7
5 5
6 """ 6 """
7 Module implementing a dialog to show the status of the submodules of the 7 Module implementing a dialog to show the status of the submodules of the
8 project. 8 project.
9 """ 9 """
10
11 import os
12 10
13 from PyQt6.QtCore import QProcess, Qt, pyqtSlot 11 from PyQt6.QtCore import QProcess, Qt, pyqtSlot
14 from PyQt6.QtWidgets import ( 12 from PyQt6.QtWidgets import (
15 QAbstractButton, 13 QAbstractButton,
16 QDialog, 14 QDialog,
63 61
64 @param projectDir name of the project directory 62 @param projectDir name of the project directory
65 @type str 63 @type str
66 """ 64 """
67 # find the root of the repo 65 # find the root of the repo
68 self.__repodir = projectDir 66 self.__repodir = self.__vcs.findRepoRoot(projectDir)
69 while not os.path.isdir(os.path.join(self.__repodir, self.__vcs.adminDir)): 67 if not self.__repodir:
70 self.__repodir = os.path.dirname(self.__repodir) 68 return
71 if os.path.splitdrive(self.__repodir)[1] == os.sep:
72 return
73 69
74 self.errorGroup.hide() 70 self.errorGroup.hide()
75 self.errors.clear() 71 self.errors.clear()
76 self.statusList.clear() 72 self.statusList.clear()
77 self.buttonBox.setEnabled(False) 73 self.buttonBox.setEnabled(False)

eric ide

mercurial