45 AuthorColumn = 4 |
45 AuthorColumn = 4 |
46 DateColumn = 5 |
46 DateColumn = 5 |
47 MessageColumn = 6 |
47 MessageColumn = 6 |
48 TagsColumn = 7 |
48 TagsColumn = 7 |
49 |
49 |
50 def __init__(self, vcs, mode="log", bundle=None, parent=None): |
50 def __init__(self, vcs, mode="log", bundle=None, isFile=False, parent=None): |
51 """ |
51 """ |
52 Constructor |
52 Constructor |
53 |
53 |
54 @param vcs reference to the vcs object |
54 @param vcs reference to the vcs object |
55 @param mode mode of the dialog (string; one of log, incoming, outgoing) |
55 @param mode mode of the dialog (string; one of log, incoming, outgoing) |
56 @param bundle name of a bundle file (string) |
56 @param bundle name of a bundle file (string) |
|
57 @param isFile flag indicating log for a file is to be shown (boolean) |
57 @param parent parent widget (QWidget) |
58 @param parent parent widget (QWidget) |
58 """ |
59 """ |
59 super(HgLogBrowserDialog, self).__init__(parent) |
60 super(HgLogBrowserDialog, self).__init__(parent) |
60 self.setupUi(self) |
61 self.setupUi(self) |
61 |
62 |
75 self.refreshButton = \ |
76 self.refreshButton = \ |
76 self.buttonBox.addButton(self.trUtf8("&Refresh"), QDialogButtonBox.ActionRole) |
77 self.buttonBox.addButton(self.trUtf8("&Refresh"), QDialogButtonBox.ActionRole) |
77 self.refreshButton.setToolTip( |
78 self.refreshButton.setToolTip( |
78 self.trUtf8("Press to refresh the list of changesets")) |
79 self.trUtf8("Press to refresh the list of changesets")) |
79 self.refreshButton.setEnabled(False) |
80 self.refreshButton.setEnabled(False) |
|
81 |
|
82 self.sbsCheckBox.setEnabled(isFile) |
80 |
83 |
81 self.vcs = vcs |
84 self.vcs = vcs |
82 if mode in ("log", "incoming", "outgoing"): |
85 if mode in ("log", "incoming", "outgoing"): |
83 self.commandMode = mode |
86 self.commandMode = mode |
84 self.initialCommandMode = mode |
87 self.initialCommandMode = mode |
957 Private method to do a diff of two revisions. |
960 Private method to do a diff of two revisions. |
958 |
961 |
959 @param rev1 first revision number (integer) |
962 @param rev1 first revision number (integer) |
960 @param rev2 second revision number (integer) |
963 @param rev2 second revision number (integer) |
961 """ |
964 """ |
962 if self.diff is None: |
965 if self.sbsCheckBox.isEnabled() and self.sbsCheckBox.isChecked(): |
963 from .HgDiffDialog import HgDiffDialog |
966 self.vcs.hgSbsDiff(self.filename, revisions=(str(rev1), str(rev2))) |
964 self.diff = HgDiffDialog(self.vcs) |
967 else: |
965 self.diff.show() |
968 if self.diff is None: |
966 self.diff.raise_() |
969 from .HgDiffDialog import HgDiffDialog |
967 self.diff.start(self.filename, [rev1, rev2], self.bundle) |
970 self.diff = HgDiffDialog(self.vcs) |
|
971 self.diff.show() |
|
972 self.diff.raise_() |
|
973 self.diff.start(self.filename, [rev1, rev2], self.bundle) |
968 |
974 |
969 def on_buttonBox_clicked(self, button): |
975 def on_buttonBox_clicked(self, button): |
970 """ |
976 """ |
971 Private slot called by a button of the button box clicked. |
977 Private slot called by a button of the button box clicked. |
972 |
978 |