--- a/Plugins/VcsPlugins/vcsSubversion/SvnLogBrowserDialog.py Tue Oct 15 22:03:54 2013 +0200 +++ b/Plugins/VcsPlugins/vcsSubversion/SvnLogBrowserDialog.py Fri Oct 18 23:00:41 2013 +0200 @@ -60,9 +60,12 @@ self.toDate.setDisplayFormat("yyyy-MM-dd") self.fromDate.setDate(QDate.currentDate()) self.toDate.setDate(QDate.currentDate()) - self.fieldCombo.setCurrentIndex(self.fieldCombo.findText(self.trUtf8("Message"))) - self.limitSpinBox.setValue(self.vcs.getPlugin().getPreferences("LogLimit")) - self.stopCheckBox.setChecked(self.vcs.getPlugin().getPreferences("StopLogOnCopy")) + self.fieldCombo.setCurrentIndex( + self.fieldCombo.findText(self.trUtf8("Message"))) + self.limitSpinBox.setValue( + self.vcs.getPlugin().getPreferences("LogLimit")) + self.stopCheckBox.setChecked( + self.vcs.getPlugin().getPreferences("StopLogOnCopy")) self.__messageRole = Qt.UserRole self.__changesRole = Qt.UserRole + 1 @@ -74,15 +77,18 @@ self.rx_sep1 = QRegExp('\\-+\\s*') self.rx_sep2 = QRegExp('=+\\s*') - self.rx_rev1 = QRegExp('rev ([0-9]+): ([^|]*) \| ([^|]*) \| ([0-9]+) .*') + self.rx_rev1 = QRegExp( + 'rev ([0-9]+): ([^|]*) \| ([^|]*) \| ([0-9]+) .*') # "rev" followed by one or more decimals followed by a colon followed - # anything up to " | " (twice) followed by one or more decimals followed - # by anything - self.rx_rev2 = QRegExp('r([0-9]+) \| ([^|]*) \| ([^|]*) \| ([0-9]+) .*') + # anything up to " | " (twice) followed by one or more decimals + # followed by anything + self.rx_rev2 = QRegExp( + 'r([0-9]+) \| ([^|]*) \| ([^|]*) \| ([0-9]+) .*') # "r" followed by one or more decimals followed by " | " followed - # anything up to " | " (twice) followed by one or more decimals followed - # by anything - self.rx_flags1 = QRegExp(r""" ([ADM])\s(.*)\s+\(\w+\s+(.*):([0-9]+)\)\s*""") + # anything up to " | " (twice) followed by one or more decimals + # followed by anything + self.rx_flags1 = QRegExp( + r""" ([ADM])\s(.*)\s+\(\w+\s+(.*):([0-9]+)\)\s*""") # three blanks followed by A or D or M followed by path followed by # path copied from followed by copied from revision self.rx_flags2 = QRegExp(' ([ADM]) (.*)\\s*') @@ -287,7 +293,8 @@ def __finish(self): """ - Private slot called when the process finished or the user pressed the button. + Private slot called when the process finished or the user pressed the + button. """ if self.process is not None and \ self.process.state() != QProcess.NotRunning: @@ -347,7 +354,8 @@ self.__generateLogItem(log["author"], log["date"], log["message"], log["revision"], changedPaths) dt = QDate.fromString(log["date"], Qt.ISODate) - if not self.__maxDate.isValid() and not self.__minDate.isValid(): + if not self.__maxDate.isValid() and \ + not self.__minDate.isValid(): self.__maxDate = dt self.__minDate = dt else: @@ -422,7 +430,8 @@ @param rev2 second revision number (integer) """ if self.sbsCheckBox.isEnabled() and self.sbsCheckBox.isChecked(): - self.vcs.svnSbsDiff(self.filename, revisions=(str(rev1), str(rev2))) + self.vcs.svnSbsDiff(self.filename, + revisions=(str(rev1), str(rev2))) else: if self.diff is None: from .SvnDiffDialog import SvnDiffDialog @@ -465,14 +474,16 @@ self.__resortFiles() self.diffPreviousButton.setEnabled( - current != self.logTree.topLevelItem(self.logTree.topLevelItemCount() - 1)) + current != self.logTree.topLevelItem( + self.logTree.topLevelItemCount() - 1)) @pyqtSlot() def on_logTree_itemSelectionChanged(self): """ Private slot called, when the selection has changed. """ - self.diffRevisionsButton.setEnabled(len(self.logTree.selectedItems()) == 2) + self.diffRevisionsButton.setEnabled( + len(self.logTree.selectedItems()) == 2) @pyqtSlot() def on_nextButton_clicked(self): @@ -493,7 +504,8 @@ return rev2 = int(itm.text(0)) - itm = self.logTree.topLevelItem(self.logTree.indexOfTopLevelItem(itm) + 1) + itm = self.logTree.topLevelItem( + self.logTree.indexOfTopLevelItem(itm) + 1) if itm is None: self.diffPreviousButton.setEnabled(False) return @@ -567,7 +579,8 @@ fieldIndex = 0 txt = self.rxEdit.text() if txt.startswith("^"): - searchRx = QRegExp("^\s*{0}".format(txt[1:]), Qt.CaseInsensitive) + searchRx = QRegExp( + "^\s*{0}".format(txt[1:]), Qt.CaseInsensitive) else: searchRx = QRegExp(txt, Qt.CaseInsensitive) else: @@ -591,7 +604,9 @@ @pyqtSlot(bool) def on_stopCheckBox_clicked(self, checked): """ - Private slot called, when the stop on copy/move checkbox is clicked + Private slot called, when the stop on copy/move checkbox is clicked. + + @param checked flag indicating the checked state (boolean) """ self.vcs.getPlugin().setPreferences("StopLogOnCopy", self.stopCheckBox.isChecked())