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