eric6/Plugins/VcsPlugins/vcsMercurial/GpgExtension/HgGpgSignaturesDialog.py

changeset 7970
c4ee8a81584c
parent 7923
91e843545d9a
child 8143
2c730d5fd177
equal deleted inserted replaced
7969:62eff8b34a8d 7970:c4ee8a81584c
5 5
6 """ 6 """
7 Module implementing a dialog showing signed changesets. 7 Module implementing a dialog showing signed changesets.
8 """ 8 """
9 9
10 import os
11 import re 10 import re
12 11
13 from PyQt5.QtCore import pyqtSlot, Qt, QCoreApplication 12 from PyQt5.QtCore import pyqtSlot, Qt, QCoreApplication
14 from PyQt5.QtWidgets import ( 13 from PyQt5.QtWidgets import (
15 QDialog, QDialogButtonBox, QHeaderView, QTreeWidgetItem 14 QDialog, QDialogButtonBox, QHeaderView, QTreeWidgetItem
51 if self.__hgClient.isExecuting(): 50 if self.__hgClient.isExecuting():
52 self.__hgClient.cancel() 51 self.__hgClient.cancel()
53 52
54 e.accept() 53 e.accept()
55 54
56 def start(self, path): 55 def start(self):
57 """ 56 """
58 Public slot to start the list command. 57 Public slot to start the list command.
59
60 @param path name of directory (string)
61 """ 58 """
62 self.errorGroup.hide() 59 self.errorGroup.hide()
63 60
64 self.intercept = False 61 self.intercept = False
65 self.activateWindow() 62 self.activateWindow()
66
67 self.__path = path
68 dname, fname = self.vcs.splitPath(path)
69
70 # find the root of the repo
71 repodir = dname
72 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)):
73 repodir = os.path.dirname(repodir)
74 if os.path.splitdrive(repodir)[1] == os.sep:
75 return
76 63
77 args = self.vcs.initCommand("sigs") 64 args = self.vcs.initCommand("sigs")
78 65
79 out, err = self.__hgClient.runcommand(args) 66 out, err = self.__hgClient.runcommand(args)
80 if err: 67 if err:
201 """ 188 """
202 rev = ( 189 rev = (
203 self.signaturesList.selectedItems()[0].text(0) 190 self.signaturesList.selectedItems()[0].text(0)
204 .split(":")[0].strip() 191 .split(":")[0].strip()
205 ) 192 )
206 self.vcs.getExtensionObject("gpg").hgGpgVerifySignatures( 193 self.vcs.getExtensionObject("gpg").hgGpgVerifySignatures(rev)
207 self.__path, rev)
208 194
209 @pyqtSlot(str) 195 @pyqtSlot(str)
210 def on_categoryCombo_activated(self, txt): 196 def on_categoryCombo_activated(self, txt):
211 """ 197 """
212 Private slot called, when a new filter category is selected. 198 Private slot called, when a new filter category is selected.

eric ide

mercurial