Plugins/VcsPlugins/vcsMercurial/HgBundleDialog.py

Sat, 24 Apr 2010 17:32:07 +0000

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 24 Apr 2010 17:32:07 +0000
changeset 199
675623ee5d7d
child 202
6854bb0beda5
permissions
-rw-r--r--

Added changegroup related actions to the Mercurial plug-in.

# -*- 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