Plugins/VcsPlugins/vcsSubversion/SvnLogBrowserDialog.py

changeset 2845
7e55c6268c35
parent 2771
281c9b30dd91
child 2847
1843ef6e2656
child 2848
15c84f1f745a
diff -r a61ee61b1c2c -r 7e55c6268c35 Plugins/VcsPlugins/vcsSubversion/SvnLogBrowserDialog.py
--- a/Plugins/VcsPlugins/vcsSubversion/SvnLogBrowserDialog.py	Mon Aug 05 13:17:51 2013 +0200
+++ b/Plugins/VcsPlugins/vcsSubversion/SvnLogBrowserDialog.py	Mon Aug 05 15:58:30 2013 +0200
@@ -24,11 +24,12 @@
     """
     Class implementing a dialog to browse the log history.
     """
-    def __init__(self, vcs, parent=None):
+    def __init__(self, vcs, isFile=False, parent=None):
         """
         Constructor
         
         @param vcs reference to the vcs object
+        @param isFile flag indicating log for a file is to be shown (boolean)
         @param parent parent widget (QWidget)
         """
         super().__init__(parent)
@@ -40,6 +41,8 @@
         self.filesTree.headerItem().setText(self.filesTree.columnCount(), "")
         self.filesTree.header().setSortIndicator(0, Qt.AscendingOrder)
         
+        self.sbsCheckBox.setEnabled(isFile)
+        
         self.vcs = vcs
         
         self.__maxDate = QDate()
@@ -411,12 +414,15 @@
         @param rev1 first revision number (integer)
         @param rev2 second revision number (integer)
         """
-        if self.diff is None:
-            from .SvnDiffDialog import SvnDiffDialog
-            self.diff = SvnDiffDialog(self.vcs)
-        self.diff.show()
-        self.diff.raise_()
-        self.diff.start(self.filename, [rev1, rev2])
+        if self.sbsCheckBox.isEnabled() and self.sbsCheckBox.isChecked():
+            self.vcs.svnSbsDiff(self.filename, revisions=(str(rev1), str(rev2)))
+        else:
+            if self.diff is None:
+                from .SvnDiffDialog import SvnDiffDialog
+                self.diff = SvnDiffDialog(self.vcs)
+            self.diff.show()
+            self.diff.raise_()
+            self.diff.start(self.filename, [rev1, rev2])
     
     def on_buttonBox_clicked(self, button):
         """

eric ide

mercurial