Plugins/VcsPlugins/vcsMercurial/HgBundleDialog.py

changeset 199
675623ee5d7d
child 202
6854bb0beda5
equal deleted inserted replaced
198:7ab8e126f404 199:675623ee5d7d
1 # -*- coding: utf-8 -*-
2
3 # Copyright (c) 2010 Detlev Offenbach <detlev@die-offenbachs.de>
4 #
5
6 """
7 Module implementing a dialog to enter the data for a bundle operation.
8 """
9
10 from PyQt4.QtGui import QDialog
11
12 from .Ui_HgBundleDialog import Ui_HgBundleDialog
13
14 class HgBundleDialog(QDialog, Ui_HgBundleDialog):
15 """
16 Class implementing a dialog to enter the data for a bundle operation.
17 """
18 def __init__(self, parent = None):
19 """
20 Constructor
21 """
22 QDialog.__init__(self, parent)
23 self.setupUi(self)
24
25 self.compressionCombo.addItems(["", "bzip2", "gzip", "none"])
26
27 def getParameters(self):
28 """
29 Public method to retrieve the bundle data.
30
31 @return tuple naming the revision, the compression type and a flag indicating
32 to bundle all changesets (string, string, boolean)
33 """
34 if self.numberButton.isChecked():
35 rev = str(self.numberSpinBox.value())
36 elif self.idButton.isChecked():
37 rev = self.idEdit.text()
38 elif self.tagButton.isChecked():
39 rev = self.tagCombo.currentText()
40 elif self.branchButton.isChecked():
41 rev = self.branchCombo.currentText()
42 else:
43 rev = ""
44
45 return rev, self.compressionCombo.currentText(), self.allCheckBox.isChecked()

eric ide

mercurial