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