27 Class implementing a dialog to show the output of the hg log command process. |
27 Class implementing a dialog to show the output of the hg log command process. |
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 revisions. |
30 a diff of the revisions. |
31 """ |
31 """ |
32 def __init__(self, vcs, mode="log", bundle=None, parent=None): |
32 def __init__(self, vcs, mode="log", bundle=None, 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 mode mode of the dialog (string; one of log, incoming, outgoing) |
37 @param mode mode of the dialog (string; one of log, incoming, outgoing) |
38 @param bundle name of a bundle file (string) |
38 @param bundle name of a bundle file (string) |
|
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().__init__(parent) |
42 super().__init__(parent) |
42 self.setupUi(self) |
43 self.setupUi(self) |
43 |
44 |
441 v1, v2 = ver.split('_') |
444 v1, v2 = ver.split('_') |
442 if v1 == "" or v2 == "": |
445 if v1 == "" or v2 == "": |
443 return |
446 return |
444 self.contents.scrollToAnchor(ver) |
447 self.contents.scrollToAnchor(ver) |
445 |
448 |
446 # TODO: add SBS option (file mode only) |
449 if self.sbsCheckBox.isEnabled() and self.sbsCheckBox.isChecked(): |
447 if self.diff is None: |
450 self.vcs.hgSbsDiff(filename, revisions=(v1, v2)) |
448 from .HgDiffDialog import HgDiffDialog |
451 else: |
449 self.diff = HgDiffDialog(self.vcs) |
452 if self.diff is None: |
450 self.diff.show() |
453 from .HgDiffDialog import HgDiffDialog |
451 self.diff.start(filename, [v1, v2], self.bundle) |
454 self.diff = HgDiffDialog(self.vcs) |
|
455 self.diff.show() |
|
456 self.diff.start(filename, [v1, v2], self.bundle) |
452 |
457 |
453 def on_passwordCheckBox_toggled(self, isOn): |
458 def on_passwordCheckBox_toggled(self, isOn): |
454 """ |
459 """ |
455 Private slot to handle the password checkbox toggled. |
460 Private slot to handle the password checkbox toggled. |
456 |
461 |