9 |
9 |
10 import os |
10 import os |
11 |
11 |
12 from PyQt4.QtCore import pyqtSlot, Qt, QDate, QProcess, QTimer, QRegExp, QSize |
12 from PyQt4.QtCore import pyqtSlot, Qt, QDate, QProcess, QTimer, QRegExp, QSize |
13 from PyQt4.QtGui import QDialog, QDialogButtonBox, QHeaderView, QTreeWidgetItem, \ |
13 from PyQt4.QtGui import QDialog, QDialogButtonBox, QHeaderView, QTreeWidgetItem, \ |
14 QApplication, QMessageBox, QCursor, QWidget, QLineEdit, QColor, QPixmap, \ |
14 QApplication, QCursor, QWidget, QLineEdit, QColor, QPixmap, \ |
15 QPainter, QPen, QBrush, QIcon |
15 QPainter, QPen, QBrush, QIcon |
16 |
16 |
17 from E5Gui.E5Application import e5App |
17 from E5Gui.E5Application import e5App |
|
18 from E5Gui import E5MessageBox |
18 |
19 |
19 from .Ui_HgLogBrowserDialog import Ui_HgLogBrowserDialog |
20 from .Ui_HgLogBrowserDialog import Ui_HgLogBrowserDialog |
20 from .HgDiffDialog import HgDiffDialog |
21 from .HgDiffDialog import HgDiffDialog |
21 |
22 |
22 import UI.PixmapCache |
23 import UI.PixmapCache |
340 errMsg = self.trUtf8("The hg process did not finish within 30s.") |
341 errMsg = self.trUtf8("The hg process did not finish within 30s.") |
341 else: |
342 else: |
342 errMsg = self.trUtf8("Could not start the hg executable.") |
343 errMsg = self.trUtf8("Could not start the hg executable.") |
343 |
344 |
344 if errMsg: |
345 if errMsg: |
345 QMessageBox.critical(self, |
346 E5MessageBox.critical(self, |
346 self.trUtf8("Mercurial Error"), |
347 self.trUtf8("Mercurial Error"), |
347 errMsg) |
348 errMsg) |
348 |
349 |
349 return parents |
350 return parents |
350 |
351 |
377 errMsg = self.trUtf8("The hg process did not finish within 30s.") |
378 errMsg = self.trUtf8("The hg process did not finish within 30s.") |
378 else: |
379 else: |
379 errMsg = self.trUtf8("Could not start the hg executable.") |
380 errMsg = self.trUtf8("Could not start the hg executable.") |
380 |
381 |
381 if errMsg: |
382 if errMsg: |
382 QMessageBox.critical(self, |
383 E5MessageBox.critical(self, |
383 self.trUtf8("Mercurial Error"), |
384 self.trUtf8("Mercurial Error"), |
384 errMsg) |
385 errMsg) |
385 |
386 |
386 def __generateLogItem(self, author, date, message, revision, changedPaths, parents, |
387 def __generateLogItem(self, author, date, message, revision, changedPaths, parents, |
387 branches, tags): |
388 branches, tags): |
527 |
528 |
528 self.process.start('hg', args) |
529 self.process.start('hg', args) |
529 procStarted = self.process.waitForStarted() |
530 procStarted = self.process.waitForStarted() |
530 if not procStarted: |
531 if not procStarted: |
531 self.inputGroup.setEnabled(False) |
532 self.inputGroup.setEnabled(False) |
532 QMessageBox.critical(None, |
533 E5MessageBox.critical(self, |
533 self.trUtf8('Process Generation Error'), |
534 self.trUtf8('Process Generation Error'), |
534 self.trUtf8( |
535 self.trUtf8( |
535 'The process {0} could not be started. ' |
536 'The process {0} could not be started. ' |
536 'Ensure, that it is in the search path.' |
537 'Ensure, that it is in the search path.' |
537 ).format('hg')) |
538 ).format('hg')) |