--- a/Plugins/VcsPlugins/vcsSubversion/SvnDiffDialog.py Tue Oct 15 22:03:54 2013 +0200 +++ b/Plugins/VcsPlugins/vcsSubversion/SvnDiffDialog.py Fri Oct 18 23:00:41 2013 +0200 @@ -4,7 +4,8 @@ # """ -Module implementing a dialog to show the output of the svn diff command process. +Module implementing a dialog to show the output of the svn diff command +process. """ from __future__ import unicode_literals # __IGNORE_WARNING__ @@ -16,7 +17,8 @@ import os from PyQt4.QtCore import QTimer, QFileInfo, QProcess, pyqtSlot, Qt -from PyQt4.QtGui import QWidget, QColor, QLineEdit, QBrush, QTextCursor, QDialogButtonBox +from PyQt4.QtGui import QWidget, QColor, QLineEdit, QBrush, QTextCursor, \ + QDialogButtonBox from E5Gui.E5Application import e5App from E5Gui import E5MessageBox, E5FileDialog @@ -29,7 +31,8 @@ class SvnDiffDialog(QWidget, Ui_SvnDiffDialog): """ - Class implementing a dialog to show the output of the svn diff command process. + Class implementing a dialog to show the output of the svn diff command + process. """ def __init__(self, vcs, parent=None): """ @@ -94,7 +97,8 @@ Public slot to start the svn diff command. @param fn filename to be diffed (string) - @param versions list of versions to be diffed (list of up to 2 strings or None) + @param versions list of versions to be diffed (list of up to 2 strings + or None) @keyparam urls list of repository URLs (list of 2 strings) @keyparam summary flag indicating a summarizing diff (only valid for URL diffs) (boolean) @@ -200,7 +204,8 @@ self.buttonBox.button(QDialogButtonBox.Save).setEnabled(True) self.buttonBox.button(QDialogButtonBox.Close).setDefault(True) - self.buttonBox.button(QDialogButtonBox.Close).setFocus(Qt.OtherFocusReason) + self.buttonBox.button(QDialogButtonBox.Close).setFocus( + Qt.OtherFocusReason) tc = self.contents.textCursor() tc.movePosition(QTextCursor.Start) @@ -211,7 +216,8 @@ self.filesCombo.addItem(self.trUtf8("<End>"), -1) for oldFile, newFile, pos in sorted(self.__fileSeparators): if oldFile != newFile: - self.filesCombo.addItem("{0}\n{1}".format(oldFile, newFile), pos) + self.filesCombo.addItem( + "{0}\n{1}".format(oldFile, newFile), pos) else: self.filesCombo.addItem(oldFile, pos) @@ -250,7 +256,8 @@ self.__oldFile = self.__extractFileName(line) else: self.__fileSeparators.append( - (self.__oldFile, self.__extractFileName(line), self.__oldFileLine)) + (self.__oldFile, self.__extractFileName(line), + self.__oldFileLine)) def __readStdout(self): """ @@ -272,9 +279,11 @@ line.startswith("+++ "): self.__processFileLine(line) - if line.startswith('+') or line.startswith('>') or line.startswith('A '): + if line.startswith('+') or line.startswith('>') or \ + line.startswith('A '): format = self.cAddedFormat - elif line.startswith('-') or line.startswith('<') or line.startswith('D '): + elif line.startswith('-') or line.startswith('<') or \ + line.startswith('D '): format = self.cRemovedFormat elif line.startswith('@@'): format = self.cLineNoFormat @@ -336,7 +345,8 @@ # step 2: move cursor to desired line tc = self.contents.textCursor() delta = tc.blockNumber() - para - tc.movePosition(QTextCursor.PreviousBlock, QTextCursor.MoveAnchor, delta) + tc.movePosition(QTextCursor.PreviousBlock, QTextCursor.MoveAnchor, + delta) self.contents.setTextCursor(tc) self.contents.ensureCursorVisible()