1106 self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel).setEnabled(True) |
1106 self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel).setEnabled(True) |
1107 self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel).setDefault(True) |
1107 self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel).setDefault(True) |
1108 QApplication.processEvents() |
1108 QApplication.processEvents() |
1109 |
1109 |
1110 with EricOverrideCursor(): |
1110 with EricOverrideCursor(): |
|
1111 self.errorGroup.hide() |
|
1112 self.errors.clear() |
|
1113 |
1111 self.buf = [] |
1114 self.buf = [] |
1112 self.cancelled = False |
1115 self.cancelled = False |
1113 self.errors.clear() |
|
1114 self.intercept = False |
1116 self.intercept = False |
1115 |
1117 |
1116 if noEntries == 0: |
1118 if noEntries == 0: |
1117 noEntries = self.limitSpinBox.value() |
1119 noEntries = self.limitSpinBox.value() |
1118 |
1120 |
1480 Private slot to show some error. |
1482 Private slot to show some error. |
1481 |
1483 |
1482 @param out error to be shown |
1484 @param out error to be shown |
1483 @type str |
1485 @type str |
1484 """ |
1486 """ |
1485 self.errorGroup.show() |
1487 errLines = [ |
1486 self.errors.insertPlainText(out) |
1488 l |
1487 self.errors.ensureCursorVisible() |
1489 for l in out.splitlines(keepends=True) |
|
1490 if "no such file in rev" not in l |
|
1491 ] |
|
1492 if errLines: |
|
1493 self.errorGroup.show() |
|
1494 self.errors.insertPlainText("".join(errLines)) |
|
1495 self.errors.ensureCursorVisible() |
1488 |
1496 |
1489 def on_buttonBox_clicked(self, button): |
1497 def on_buttonBox_clicked(self, button): |
1490 """ |
1498 """ |
1491 Private slot called by a button of the button box clicked. |
1499 Private slot called by a button of the button box clicked. |
1492 |
1500 |
1952 if self.nextButton.isEnabled(): |
1960 if self.nextButton.isEnabled(): |
1953 if self.__lastRev > 0: |
1961 if self.__lastRev > 0: |
1954 self.__getLogEntries(startRev=self.__lastRev - 1) |
1962 self.__getLogEntries(startRev=self.__lastRev - 1) |
1955 else: |
1963 else: |
1956 self.__getLogEntries() |
1964 self.__getLogEntries() |
|
1965 self.__generateDiffs() |
1957 |
1966 |
1958 @pyqtSlot(QDate) |
1967 @pyqtSlot(QDate) |
1959 def on_fromDate_dateChanged(self, date): |
1968 def on_fromDate_dateChanged(self, date): |
1960 """ |
1969 """ |
1961 Private slot called, when the from date changes. |
1970 Private slot called, when the from date changes. |
2769 selectedItems = self.logTree.selectedItems() |
2778 selectedItems = self.logTree.selectedItems() |
2770 if len(selectedItems) == 1: |
2779 if len(selectedItems) == 1: |
2771 currentItem = selectedItems[0] |
2780 currentItem = selectedItems[0] |
2772 rev2 = currentItem.text(self.RevisionColumn).split(":", 1)[0] |
2781 rev2 = currentItem.text(self.RevisionColumn).split(":", 1)[0] |
2773 parents = currentItem.data(0, self.__parentsRole) |
2782 parents = currentItem.data(0, self.__parentsRole) |
2774 if len(parents) >= parent: |
2783 if len(parents) == 0: |
|
2784 currentBranch = currentItem.text(self.BranchColumn) |
|
2785 itemBelow = self.logTree.itemBelow(currentItem) |
|
2786 while ( |
|
2787 itemBelow is not None |
|
2788 and itemBelow.text(self.BranchColumn) != currentBranch |
|
2789 ): |
|
2790 # try the next one |
|
2791 itemBelow = self.logTree.itemBelow(itemBelow) |
|
2792 if itemBelow is None: |
|
2793 self.diffEdit.setPlainText( |
|
2794 self.tr("No differences available. Get some more log entries.") |
|
2795 if self.nextButton.isEnabled() |
|
2796 else self.tr("No differences available.") |
|
2797 ) |
|
2798 else: |
|
2799 rev1 = itemBelow.text(self.RevisionColumn).split(":", 1)[0] |
|
2800 |
|
2801 self.__diffGenerator.start( |
|
2802 self.__filename, [rev1, rev2], self.__bundle |
|
2803 ) |
|
2804 |
|
2805 elif len(parents) >= parent: |
2775 self.diffLabel.setText( |
2806 self.diffLabel.setText( |
2776 self.tr("Differences to Parent {0}").format(parent) |
2807 self.tr("Differences to Parent {0}").format(parent) |
2777 ) |
2808 ) |
2778 rev1 = parents[parent - 1] |
2809 rev1 = parents[parent - 1] |
2779 |
2810 |