354 'Added {0} (copied from {1})<br />\n')\ |
354 'Added {0} (copied from {1})<br />\n')\ |
355 .format(Utilities.html_encode(f), |
355 .format(Utilities.html_encode(f), |
356 Utilities.html_encode(fileCopies[f])) |
356 Utilities.html_encode(fileCopies[f])) |
357 else: |
357 else: |
358 html += self.trUtf8('Added {0}<br />\n')\ |
358 html += self.trUtf8('Added {0}<br />\n')\ |
359 .format(Utilities.html_encode(f)) |
359 .format(Utilities.html_encode(f)) |
360 |
360 |
361 if entry["files_mods"]: |
361 if entry["files_mods"]: |
362 html += '<br />\n' |
362 html += '<br />\n' |
363 for f in entry["files_mods"].strip().split(", "): |
363 for f in entry["files_mods"].strip().split(", "): |
364 html += self.trUtf8('Modified {0}<br />\n')\ |
364 html += self.trUtf8('Modified {0}<br />\n')\ |
365 .format(Utilities.html_encode(f)) |
365 .format(Utilities.html_encode(f)) |
366 |
366 |
367 if entry["file_dels"]: |
367 if entry["file_dels"]: |
368 html += '<br />\n' |
368 html += '<br />\n' |
369 for f in entry["file_dels"].strip().split(", "): |
369 for f in entry["file_dels"].strip().split(", "): |
370 html += self.trUtf8('Deleted {0}<br />\n')\ |
370 html += self.trUtf8('Deleted {0}<br />\n')\ |
371 .format(Utilities.html_encode(f)) |
371 .format(Utilities.html_encode(f)) |
372 |
372 |
373 html += '</p>{0}<br/>\n'.format(80 * "=") |
373 html += '</p>{0}<br/>\n'.format(80 * "=") |
374 |
374 |
375 self.contents.setHtml(html) |
375 self.contents.setHtml(html) |
376 tc = self.contents.textCursor() |
376 tc = self.contents.textCursor() |
386 """ |
386 """ |
387 self.process.setReadChannel(QProcess.StandardOutput) |
387 self.process.setReadChannel(QProcess.StandardOutput) |
388 |
388 |
389 while self.process.canReadLine(): |
389 while self.process.canReadLine(): |
390 s = str(self.process.readLine(), |
390 s = str(self.process.readLine(), |
391 Preferences.getSystem("IOEncoding"), |
391 Preferences.getSystem("IOEncoding"), |
392 'replace') |
392 'replace') |
393 self.__processOutputLine(s) |
393 self.__processOutputLine(s) |
394 |
394 |
395 def __processOutputLine(self, line): |
395 def __processOutputLine(self, line): |
396 """ |
396 """ |
397 Private method to process the lines of output. |
397 Private method to process the lines of output. |
409 key = "" |
409 key = "" |
410 value = line |
410 value = line |
411 if key == "change": |
411 if key == "change": |
412 self.endInitialText = True |
412 self.endInitialText = True |
413 if key in ("change", "branches", "tags", "parents", "user", |
413 if key in ("change", "branches", "tags", "parents", "user", |
414 "date", "file_copies", "file_adds", "files_mods", |
414 "date", "file_copies", "file_adds", "files_mods", |
415 "file_dels", "bookmarks", "phase"): |
415 "file_dels", "bookmarks", "phase"): |
416 self.lastLogEntry[key] = value.strip() |
416 self.lastLogEntry[key] = value.strip() |
417 elif key == "description": |
417 elif key == "description": |
418 self.lastLogEntry[key] = [value.strip()] |
418 self.lastLogEntry[key] = [value.strip()] |
419 else: |
419 else: |
420 if self.endInitialText: |
420 if self.endInitialText: |
429 It reads the error output of the process and inserts it into the |
429 It reads the error output of the process and inserts it into the |
430 error pane. |
430 error pane. |
431 """ |
431 """ |
432 if self.process is not None: |
432 if self.process is not None: |
433 s = str(self.process.readAllStandardError(), |
433 s = str(self.process.readAllStandardError(), |
434 Preferences.getSystem("IOEncoding"), |
434 Preferences.getSystem("IOEncoding"), |
435 'replace') |
435 'replace') |
436 self.__showError(s) |
436 self.__showError(s) |
437 |
437 |
438 def __showError(self, out): |
438 def __showError(self, out): |
439 """ |
439 """ |
440 Private slot to show some error. |
440 Private slot to show some error. |