15 QTreeWidgetItem, QLineEdit |
15 QTreeWidgetItem, QLineEdit |
16 |
16 |
17 from E5Gui import E5MessageBox |
17 from E5Gui import E5MessageBox |
18 |
18 |
19 from .Ui_HgGpgSignaturesDialog import Ui_HgGpgSignaturesDialog |
19 from .Ui_HgGpgSignaturesDialog import Ui_HgGpgSignaturesDialog |
20 |
|
21 import Preferences |
|
22 |
20 |
23 |
21 |
24 class HgGpgSignaturesDialog(QDialog, Ui_HgGpgSignaturesDialog): |
22 class HgGpgSignaturesDialog(QDialog, Ui_HgGpgSignaturesDialog): |
25 """ |
23 """ |
26 Class implementing a dialog showing signed changesets. |
24 Class implementing a dialog showing signed changesets. |
86 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)): |
84 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)): |
87 repodir = os.path.dirname(repodir) |
85 repodir = os.path.dirname(repodir) |
88 if os.path.splitdrive(repodir)[1] == os.sep: |
86 if os.path.splitdrive(repodir)[1] == os.sep: |
89 return |
87 return |
90 |
88 |
91 args = [] |
89 args = self.vcs.initCommand("sigs") |
92 args.append('sigs') |
|
93 |
90 |
94 if self.__hgClient: |
91 if self.__hgClient: |
95 self.inputGroup.setEnabled(False) |
92 self.inputGroup.setEnabled(False) |
96 self.inputGroup.hide() |
93 self.inputGroup.hide() |
97 |
94 |
225 the contents pane. |
222 the contents pane. |
226 """ |
223 """ |
227 self.process.setReadChannel(QProcess.StandardOutput) |
224 self.process.setReadChannel(QProcess.StandardOutput) |
228 |
225 |
229 while self.process.canReadLine(): |
226 while self.process.canReadLine(): |
230 s = str(self.process.readLine(), |
227 s = str(self.process.readLine(), self.vcs.getEncoding(), |
231 Preferences.getSystem("IOEncoding"), |
|
232 'replace').strip() |
228 'replace').strip() |
233 self.__processOutputLine(s) |
229 self.__processOutputLine(s) |
234 |
230 |
235 def __processOutputLine(self, line): |
231 def __processOutputLine(self, line): |
236 """ |
232 """ |
253 It reads the error output of the process and inserts it into the |
249 It reads the error output of the process and inserts it into the |
254 error pane. |
250 error pane. |
255 """ |
251 """ |
256 if self.process is not None: |
252 if self.process is not None: |
257 s = str(self.process.readAllStandardError(), |
253 s = str(self.process.readAllStandardError(), |
258 Preferences.getSystem("IOEncoding"), |
254 self.vcs.getEncoding(), 'replace') |
259 'replace') |
|
260 self.__showError(s) |
255 self.__showError(s) |
261 |
256 |
262 def __showError(self, out): |
257 def __showError(self, out): |
263 """ |
258 """ |
264 Private slot to show some error. |
259 Private slot to show some error. |