Plugins/VcsPlugins/vcsSubversion/SvnLogDialog.py

branch
Py2 comp.
changeset 2847
1843ef6e2656
parent 2791
a9577f248f04
parent 2845
7e55c6268c35
child 2911
ce77f0b1ee67
equal deleted inserted replaced
2846:b852fe4d153a 2847:1843ef6e2656
31 Class implementing a dialog to show the output of the svn log command process. 31 Class implementing a dialog to show the output of the svn log command process.
32 32
33 The dialog is nonmodal. Clicking a link in the upper text pane shows 33 The dialog is nonmodal. Clicking a link in the upper text pane shows
34 a diff of the versions. 34 a diff of the versions.
35 """ 35 """
36 def __init__(self, vcs, parent=None): 36 def __init__(self, vcs, isFile=False, parent=None):
37 """ 37 """
38 Constructor 38 Constructor
39 39
40 @param vcs reference to the vcs object 40 @param vcs reference to the vcs object
41 @param isFile flag indicating log for a file is to be shown (boolean)
41 @param parent parent widget (QWidget) 42 @param parent parent widget (QWidget)
42 """ 43 """
43 super(SvnLogDialog, self).__init__(parent) 44 super(SvnLogDialog, self).__init__(parent)
44 self.setupUi(self) 45 self.setupUi(self)
45 46
80 self.revisions = [] # stack of remembered revisions 81 self.revisions = [] # stack of remembered revisions
81 self.revString = self.trUtf8('revision') 82 self.revString = self.trUtf8('revision')
82 83
83 self.buf = [] # buffer for stdout 84 self.buf = [] # buffer for stdout
84 self.diff = None 85 self.diff = None
86
87 self.sbsCheckBox.setEnabled(isFile)
85 88
86 def closeEvent(self, e): 89 def closeEvent(self, e):
87 """ 90 """
88 Private slot implementing a close event handler. 91 Private slot implementing a close event handler.
89 92
270 v2 = ver.split('_')[1] 273 v2 = ver.split('_')[1]
271 if v1 == "" or v2 == "": 274 if v1 == "" or v2 == "":
272 return 275 return
273 self.contents.scrollToAnchor(ver) 276 self.contents.scrollToAnchor(ver)
274 277
275 if self.diff is None: 278 if self.sbsCheckBox.isEnabled() and self.sbsCheckBox.isChecked():
276 from .SvnDiffDialog import SvnDiffDialog 279 self.vcs.svnSbsDiff(filename, revisions=(v1, v2))
277 self.diff = SvnDiffDialog(self.vcs) 280 else:
278 self.diff.show() 281 if self.diff is None:
279 self.diff.start(filename, [v1, v2]) 282 from .SvnDiffDialog import SvnDiffDialog
283 self.diff = SvnDiffDialog(self.vcs)
284 self.diff.show()
285 self.diff.start(filename, [v1, v2])
280 286
281 def on_passwordCheckBox_toggled(self, isOn): 287 def on_passwordCheckBox_toggled(self, isOn):
282 """ 288 """
283 Private slot to handle the password checkbox toggled. 289 Private slot to handle the password checkbox toggled.
284 290

eric ide

mercurial