Plugins/VcsPlugins/vcsMercurial/HgBundleDialog.py

changeset 199
675623ee5d7d
child 202
6854bb0beda5
diff -r 7ab8e126f404 -r 675623ee5d7d Plugins/VcsPlugins/vcsMercurial/HgBundleDialog.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Plugins/VcsPlugins/vcsMercurial/HgBundleDialog.py	Sat Apr 24 17:32:07 2010 +0000
@@ -0,0 +1,45 @@
+# -*- coding: utf-8 -*-
+
+# Copyright (c) 2010 Detlev Offenbach <detlev@die-offenbachs.de>
+#
+
+"""
+Module implementing a dialog to enter the data for a bundle operation.
+"""
+
+from PyQt4.QtGui import QDialog
+
+from .Ui_HgBundleDialog import Ui_HgBundleDialog
+
+class HgBundleDialog(QDialog, Ui_HgBundleDialog):
+    """
+    Class implementing a dialog to enter the data for a bundle operation.
+    """
+    def __init__(self, parent = None):
+        """
+        Constructor
+        """
+        QDialog.__init__(self, parent)
+        self.setupUi(self)
+        
+        self.compressionCombo.addItems(["", "bzip2", "gzip", "none"])
+    
+    def getParameters(self):
+        """
+        Public method to retrieve the bundle data.
+        
+        @return tuple naming the revision, the compression type and a flag indicating 
+            to bundle all changesets (string, string, boolean)
+        """
+        if self.numberButton.isChecked():
+            rev = str(self.numberSpinBox.value())
+        elif self.idButton.isChecked():
+            rev = self.idEdit.text()
+        elif self.tagButton.isChecked():
+            rev = self.tagCombo.currentText()
+        elif self.branchButton.isChecked():
+            rev = self.branchCombo.currentText()
+        else:
+            rev = ""
+        
+        return rev, self.compressionCombo.currentText(), self.allCheckBox.isChecked()

eric ide

mercurial