Plugins/VcsPlugins/vcsPySvn/SvnLogDialog.py

changeset 2845
7e55c6268c35
parent 2406
975af671146d
child 2847
1843ef6e2656
child 2848
15c84f1f745a
equal deleted inserted replaced
2844:a61ee61b1c2c 2845:7e55c6268c35
27 Class implementing a dialog to show the output of the svn log command. 27 Class implementing a dialog to show the output of the svn log command.
28 28
29 The dialog is nonmodal. Clicking a link in the upper text pane shows 29 The dialog is nonmodal. Clicking a link in the upper text pane shows
30 a diff of the versions. 30 a diff of the versions.
31 """ 31 """
32 def __init__(self, vcs, parent=None): 32 def __init__(self, vcs, isFile=False, parent=None):
33 """ 33 """
34 Constructor 34 Constructor
35 35
36 @param vcs reference to the vcs object 36 @param vcs reference to the vcs object
37 @param isFile flag indicating log for a file is to be shown (boolean)
37 @param parent parent widget (QWidget) 38 @param parent parent widget (QWidget)
38 """ 39 """
39 super().__init__(parent) 40 super().__init__(parent)
40 self.setupUi(self) 41 self.setupUi(self)
41 SvnDialogMixin.__init__(self) 42 SvnDialogMixin.__init__(self)
56 'M': self.trUtf8('Modified') 57 'M': self.trUtf8('Modified')
57 } 58 }
58 59
59 self.revString = self.trUtf8('revision') 60 self.revString = self.trUtf8('revision')
60 self.diff = None 61 self.diff = None
62
63 self.sbsCheckBox.setEnabled(isFile)
61 64
62 self.client = self.vcs.getClient() 65 self.client = self.vcs.getClient()
63 self.client.callback_cancel = \ 66 self.client.callback_cancel = \
64 self._clientCancelCallback 67 self._clientCancelCallback
65 self.client.callback_get_login = \ 68 self.client.callback_get_login = \
224 v2 = int(v2) 227 v2 = int(v2)
225 except ValueError: 228 except ValueError:
226 return 229 return
227 self.contents.scrollToAnchor(ver) 230 self.contents.scrollToAnchor(ver)
228 231
229 if self.diff is None: 232 if self.sbsCheckBox.isEnabled() and self.sbsCheckBox.isChecked():
230 from .SvnDiffDialog import SvnDiffDialog 233 self.vcs.svnSbsDiff(filename, revisions=(v1, v2))
231 self.diff = SvnDiffDialog(self.vcs) 234 else:
232 self.diff.show() 235 if self.diff is None:
233 self.diff.start(filename, [v1, v2], pegRev=self.__pegRev) 236 from .SvnDiffDialog import SvnDiffDialog
237 self.diff = SvnDiffDialog(self.vcs)
238 self.diff.show()
239 self.diff.start(filename, [v1, v2], pegRev=self.__pegRev)
234 240
235 def __showError(self, msg): 241 def __showError(self, msg):
236 """ 242 """
237 Private slot to show an error message. 243 Private slot to show an error message.
238 244

eric ide

mercurial