--- a/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py Thu Aug 01 19:12:57 2013 +0200 +++ b/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py Fri Aug 02 16:29:25 2013 +0200 @@ -41,13 +41,14 @@ MessageColumn = 6 TagsColumn = 7 - def __init__(self, vcs, mode="log", bundle=None, parent=None): + def __init__(self, vcs, mode="log", bundle=None, isFile=False, parent=None): """ Constructor @param vcs reference to the vcs object @param mode mode of the dialog (string; one of log, incoming, outgoing) @param bundle name of a bundle file (string) + @param isFile flag indicating log for a file is to be shown (boolean) @param parent parent widget (QWidget) """ super().__init__(parent) @@ -72,6 +73,8 @@ self.trUtf8("Press to refresh the list of changesets")) self.refreshButton.setEnabled(False) + self.sbsCheckBox.setEnabled(isFile) + self.vcs = vcs if mode in ("log", "incoming", "outgoing"): self.commandMode = mode @@ -953,13 +956,15 @@ @param rev1 first revision number (integer) @param rev2 second revision number (integer) """ - # TODO: add SBS option (file mode only) - if self.diff is None: - from .HgDiffDialog import HgDiffDialog - self.diff = HgDiffDialog(self.vcs) - self.diff.show() - self.diff.raise_() - self.diff.start(self.filename, [rev1, rev2], self.bundle) + if self.sbsCheckBox.isEnabled() and self.sbsCheckBox.isChecked(): + self.vcs.hgSbsDiff(self.filename, revisions=(str(rev1), str(rev2))) + else: + if self.diff is None: + from .HgDiffDialog import HgDiffDialog + self.diff = HgDiffDialog(self.vcs) + self.diff.show() + self.diff.raise_() + self.diff.start(self.filename, [rev1, rev2], self.bundle) def on_buttonBox_clicked(self, button): """