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

branch
eric7
changeset 9616
13aa04c979d7
parent 9482
a2bc06a54d9d
child 9653
e67609152c5e
equal deleted inserted replaced
9615:fbb3616f6bd3 9616:13aa04c979d7
4 # 4 #
5 5
6 """ 6 """
7 Module implementing a dialog to show some patch file statistics. 7 Module implementing a dialog to show some patch file statistics.
8 """ 8 """
9
10 import os
11 9
12 from PyQt6.QtCore import QProcess, Qt 10 from PyQt6.QtCore import QProcess, Qt
13 from PyQt6.QtWidgets import QDialog, QHeaderView, QTreeWidgetItem 11 from PyQt6.QtWidgets import QDialog, QHeaderView, QTreeWidgetItem
14 12
15 from eric7 import Preferences 13 from eric7 import Preferences
55 53
56 self.changesTreeWidget.clear() 54 self.changesTreeWidget.clear()
57 self.summaryEdit.clear() 55 self.summaryEdit.clear()
58 56
59 # find the root of the repo 57 # find the root of the repo
60 repodir = projectDir 58 repodir = self.__vcs.findRepoRoot(projectDir)
61 while not os.path.isdir(os.path.join(repodir, self.__vcs.adminDir)): 59 if not repodir:
62 repodir = os.path.dirname(repodir) 60 return
63 if os.path.splitdrive(repodir)[1] == os.sep:
64 return
65 61
66 dlg = GitPatchFilesDialog(repodir, patchCheckData) 62 dlg = GitPatchFilesDialog(repodir, patchCheckData)
67 if dlg.exec() == QDialog.DialogCode.Accepted: 63 if dlg.exec() == QDialog.DialogCode.Accepted:
68 patchFilesList, stripCount, inaccurateEof, recount = dlg.getData() 64 patchFilesList, stripCount, inaccurateEof, recount = dlg.getData()
69 self.__patchCheckData = (patchFilesList, stripCount, inaccurateEof, recount) 65 self.__patchCheckData = (patchFilesList, stripCount, inaccurateEof, recount)

eric ide

mercurial