150 procStarted = process.waitForStarted() |
150 procStarted = process.waitForStarted() |
151 if procStarted: |
151 if procStarted: |
152 finished = process.waitForFinished(30000) |
152 finished = process.waitForFinished(30000) |
153 if finished: |
153 if finished: |
154 if process.exitCode() == 0: |
154 if process.exitCode() == 0: |
155 output = unicode(process.readAllStandardOutput(), |
155 output = str(process.readAllStandardOutput(), ioEncoding, 'replace') |
156 ioEncoding, 'replace') |
|
157 for line in output.splitlines(): |
156 for line in output.splitlines(): |
158 line = line.strip() |
157 line = line.strip() |
159 if line.startswith('<root>'): |
158 if line.startswith('<root>'): |
160 repoRoot = line.replace('<root>', '').replace('</root>', '') |
159 repoRoot = line.replace('<root>', '').replace('</root>', '') |
161 break |
160 break |
162 else: |
161 else: |
163 error = unicode(process.readAllStandardError()) |
162 error = str(process.readAllStandardError(), |
|
163 Preferences.getSystem("IOEncoding"), |
|
164 'replace') |
164 self.errors.insertPlainText(error) |
165 self.errors.insertPlainText(error) |
165 self.errors.ensureCursorVisible() |
166 self.errors.ensureCursorVisible() |
166 else: |
167 else: |
167 QApplication.restoreOverrideCursor() |
168 QApplication.restoreOverrideCursor() |
168 QMessageBox.critical(None, |
169 QMessageBox.critical(None, |
365 """ |
366 """ |
366 if self.process is not None: |
367 if self.process is not None: |
367 self.process.setReadChannel(QProcess.StandardOutput) |
368 self.process.setReadChannel(QProcess.StandardOutput) |
368 |
369 |
369 while self.process.canReadLine(): |
370 while self.process.canReadLine(): |
370 s = unicode(self.process.readLine()) |
371 s = str(self.process.readLine(), |
|
372 Preferences.getSystem("IOEncoding"), |
|
373 'replace') |
371 if self.__rx_dir.exactMatch(s): |
374 if self.__rx_dir.exactMatch(s): |
372 revision = self.__rx_dir.cap(1) |
375 revision = self.__rx_dir.cap(1) |
373 author = self.__rx_dir.cap(2) |
376 author = self.__rx_dir.cap(2) |
374 date = self.__rx_dir.cap(3) |
377 date = self.__rx_dir.cap(3) |
375 name = self.__rx_dir.cap(4).strip() |
378 name = self.__rx_dir.cap(4).strip() |
395 |
398 |
396 It reads the error output of the process and inserts it into the |
399 It reads the error output of the process and inserts it into the |
397 error pane. |
400 error pane. |
398 """ |
401 """ |
399 if self.process is not None: |
402 if self.process is not None: |
400 s = unicode(self.process.readAllStandardError()) |
403 s = str(self.process.readAllStandardError(), |
|
404 Preferences.getSystem("IOEncoding"), |
|
405 'replace') |
401 self.errors.insertPlainText(s) |
406 self.errors.insertPlainText(s) |
402 self.errors.ensureCursorVisible() |
407 self.errors.ensureCursorVisible() |
403 |
408 |
404 def on_passwordCheckBox_toggled(self, isOn): |
409 def on_passwordCheckBox_toggled(self, isOn): |
405 """ |
410 """ |