Plugins/VcsPlugins/vcsMercurial/HgBundleDialog.py

changeset 1274
442c748018c5
parent 1131
7781e396c903
child 1509
c0b5e693b0eb
equal deleted inserted replaced
1269:7b4d9f1d7c6c 1274:442c748018c5
43 def __updateOK(self): 43 def __updateOK(self):
44 """ 44 """
45 Private slot to update the OK button. 45 Private slot to update the OK button.
46 """ 46 """
47 enabled = True 47 enabled = True
48 if self.idButton.isChecked(): 48 if self.multipleButton.isChecked():
49 enabled = self.idEdit.text() != "" 49 enabled = self.multipleEdit.toPlainText() != ""
50 elif self.tagButton.isChecked(): 50 elif self.tagButton.isChecked():
51 enabled = self.tagCombo.currentText() != "" 51 enabled = self.tagCombo.currentText() != ""
52 elif self.branchButton.isChecked(): 52 elif self.branchButton.isChecked():
53 enabled = self.branchCombo.currentText() != "" 53 enabled = self.branchCombo.currentText() != ""
54 elif self.bookmarkButton.isChecked(): 54 elif self.bookmarkButton.isChecked():
55 enabled = self.bookmarkCombo.currentText() != "" 55 enabled = self.bookmarkCombo.currentText() != ""
56 56
57 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(enabled) 57 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(enabled)
58 58
59 @pyqtSlot(bool) 59 @pyqtSlot(bool)
60 def on_idButton_toggled(self, checked): 60 def on_multipleButton_toggled(self, checked):
61 """ 61 """
62 Private slot to handle changes of the ID select button. 62 Private slot to handle changes of the Multiple select button.
63 63
64 @param checked state of the button (boolean) 64 @param checked state of the button (boolean)
65 """ 65 """
66 self.__updateOK() 66 self.__updateOK()
67 67
90 90
91 @param checked state of the button (boolean) 91 @param checked state of the button (boolean)
92 """ 92 """
93 self.__updateOK() 93 self.__updateOK()
94 94
95 @pyqtSlot(str) 95 @pyqtSlot()
96 def on_idEdit_textChanged(self, txt): 96 def on_multipleEdit_textChanged(self):
97 """ 97 """
98 Private slot to handle changes of the ID edit. 98 Private slot to handle changes of the Multiple edit.
99
100 @param txt text of the edit (string)
101 """ 99 """
102 self.__updateOK() 100 self.__updateOK()
103 101
104 @pyqtSlot(str) 102 @pyqtSlot(str)
105 def on_tagCombo_editTextChanged(self, txt): 103 def on_tagCombo_editTextChanged(self, txt):
130 128
131 def getParameters(self): 129 def getParameters(self):
132 """ 130 """
133 Public method to retrieve the bundle data. 131 Public method to retrieve the bundle data.
134 132
135 @return tuple naming the revision, the compression type and a flag indicating 133 @return tuple naming the revisions, base revisions, the compression type and
136 to bundle all changesets (string, string, boolean) 134 a flag indicating to bundle all changesets (string, string, boolean)
137 """ 135 """
138 if self.numberButton.isChecked(): 136 if self.multipleButton.isChecked():
139 rev = str(self.numberSpinBox.value()) 137 revs = self.multipleEdit.toPlainText().strip().splitlines()
140 elif self.idButton.isChecked():
141 rev = self.idEdit.text()
142 elif self.tagButton.isChecked(): 138 elif self.tagButton.isChecked():
143 rev = self.tagCombo.currentText() 139 revs = [self.tagCombo.currentText()]
144 elif self.branchButton.isChecked(): 140 elif self.branchButton.isChecked():
145 rev = self.branchCombo.currentText() 141 revs = [self.branchCombo.currentText()]
146 elif self.bookmarkButton.isChecked(): 142 elif self.bookmarkButton.isChecked():
147 rev = self.bookmarkCombo.currentText() 143 revs = [self.bookmarkCombo.currentText()]
148 else: 144 else:
149 rev = "" 145 revs = []
150 146
151 return rev, self.compressionCombo.currentText(), self.allCheckBox.isChecked() 147 baseRevs = self.baseRevisionsEdit.toPlainText().strip().splitlines()
148
149 return (revs, baseRevs, self.compressionCombo.currentText(),
150 self.allCheckBox.isChecked())

eric ide

mercurial