Plugins/VcsPlugins/vcsMercurial/HgBundleDialog.py

Fri, 31 Dec 2010 15:49:50 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Fri, 31 Dec 2010 15:49:50 +0100
changeset 791
9ec2ac20e54e
parent 739
efbfe57c8219
child 945
8cd4d08fa9f6
child 1510
e75ecf2bd9dd
permissions
-rw-r--r--

Updated copyright notice.

199
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
791
9ec2ac20e54e Updated copyright notice.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 739
diff changeset
3 # Copyright (c) 2010 - 2011 Detlev Offenbach <detlev@die-offenbachs.de>
199
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 Module implementing a dialog to enter the data for a bundle operation.
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 """
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
10 from PyQt4.QtGui import QDialog
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
11
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
12 from .Ui_HgBundleDialog import Ui_HgBundleDialog
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
13
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
14 class HgBundleDialog(QDialog, Ui_HgBundleDialog):
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
15 """
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
16 Class implementing a dialog to enter the data for a bundle operation.
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
17 """
202
6854bb0beda5 Added bisect commands to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 199
diff changeset
18 def __init__(self, tagsList, branchesList, parent = None):
199
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
19 """
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
20 Constructor
202
6854bb0beda5 Added bisect commands to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 199
diff changeset
21
6854bb0beda5 Added bisect commands to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 199
diff changeset
22 @param tagsList list of tags (list of strings)
6854bb0beda5 Added bisect commands to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 199
diff changeset
23 @param branchesList list of branches (list of strings)
6854bb0beda5 Added bisect commands to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 199
diff changeset
24 @param parent parent widget (QWidget)
199
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
25 """
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
26 QDialog.__init__(self, parent)
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
27 self.setupUi(self)
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
28
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
29 self.compressionCombo.addItems(["", "bzip2", "gzip", "none"])
739
efbfe57c8219 Modified some list(sorted(...)) calls.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 202
diff changeset
30 self.tagCombo.addItems(sorted(tagsList))
efbfe57c8219 Modified some list(sorted(...)) calls.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 202
diff changeset
31 self.branchCombo.addItems(["default"] + sorted(branchesList))
199
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
32
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
33 def getParameters(self):
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
34 """
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
35 Public method to retrieve the bundle data.
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
36
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
37 @return tuple naming the revision, the compression type and a flag indicating
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
38 to bundle all changesets (string, string, boolean)
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
39 """
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
40 if self.numberButton.isChecked():
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
41 rev = str(self.numberSpinBox.value())
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
42 elif self.idButton.isChecked():
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
43 rev = self.idEdit.text()
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
44 elif self.tagButton.isChecked():
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
45 rev = self.tagCombo.currentText()
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
46 elif self.branchButton.isChecked():
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
47 rev = self.branchCombo.currentText()
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
48 else:
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
49 rev = ""
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
50
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
51 return rev, self.compressionCombo.currentText(), self.allCheckBox.isChecked()

eric ide

mercurial