15 |
15 |
16 class HgGraftDialog(QDialog, Ui_HgGraftDialog): |
16 class HgGraftDialog(QDialog, Ui_HgGraftDialog): |
17 """ |
17 """ |
18 Class implementing a dialog to enter the data for a graft session. |
18 Class implementing a dialog to enter the data for a graft session. |
19 """ |
19 """ |
20 def __init__(self, vcs, parent=None): |
20 def __init__(self, vcs, revs=None, parent=None): |
21 """ |
21 """ |
22 Constructor |
22 Constructor |
23 |
23 |
24 @param vcs reference to the VCS object (Hg) |
24 @param vcs reference to the VCS object (Hg) |
|
25 @param revs list of revisions to show in the revisions pane (list of strings) |
25 @param parent reference to the parent widget (QWidget) |
26 @param parent reference to the parent widget (QWidget) |
26 """ |
27 """ |
27 super().__init__(parent) |
28 super().__init__(parent) |
28 self.setupUi(self) |
29 self.setupUi(self) |
29 |
30 |
31 |
32 |
32 if vcs.version < (2, 3): |
33 if vcs.version < (2, 3): |
33 self.logCheckBox.setEnabled(False) |
34 self.logCheckBox.setEnabled(False) |
34 self.logCheckBox.setChecked(False) |
35 self.logCheckBox.setChecked(False) |
35 self.logCheckBox.setVisible(False) |
36 self.logCheckBox.setVisible(False) |
|
37 |
|
38 if revs: |
|
39 self.revisionsEdit.setPlainText("\n".join(sorted(revs))) |
36 |
40 |
37 self.__updateOk() |
41 self.__updateOk() |
38 |
42 |
39 def __updateOk(self): |
43 def __updateOk(self): |
40 """ |
44 """ |