eric6/Plugins/VcsPlugins/vcsMercurial/HgBundleDialog.py

Wed, 30 Dec 2020 11:00:44 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 30 Dec 2020 11:00:44 +0100
branch
maintenance
changeset 7924
8a96736d465e
parent 7780
41420f82c0ac
child 8143
2c730d5fd177
permissions
-rw-r--r--

Updated copyright for 2021.

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
7924
8a96736d465e Updated copyright for 2021.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7780
diff changeset
3 # Copyright (c) 2010 - 2021 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
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3178
diff changeset
10 from PyQt5.QtCore import pyqtSlot
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3178
diff changeset
11 from PyQt5.QtWidgets import QDialog, QDialogButtonBox
199
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
12
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
13 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
14
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
15
199
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
16 class HgBundleDialog(QDialog, Ui_HgBundleDialog):
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
17 """
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18 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
19 """
3008
7848489bcb92 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
20 def __init__(self, tagsList, branchesList, bookmarksList=None,
5678
0aa72754d535 Added support for the 'zstd' compression for bundles (as of 4.1.0).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5500
diff changeset
21 version=(0, 0, 0), parent=None):
199
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
22 """
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
23 Constructor
202
6854bb0beda5 Added bisect commands to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 199
diff changeset
24
5678
0aa72754d535 Added support for the 'zstd' compression for bundles (as of 4.1.0).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5500
diff changeset
25 @param tagsList list of tags
0aa72754d535 Added support for the 'zstd' compression for bundles (as of 4.1.0).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5500
diff changeset
26 @type list of str
0aa72754d535 Added support for the 'zstd' compression for bundles (as of 4.1.0).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5500
diff changeset
27 @param branchesList list of branches
0aa72754d535 Added support for the 'zstd' compression for bundles (as of 4.1.0).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5500
diff changeset
28 @type list of str
0aa72754d535 Added support for the 'zstd' compression for bundles (as of 4.1.0).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5500
diff changeset
29 @param bookmarksList list of bookmarks
0aa72754d535 Added support for the 'zstd' compression for bundles (as of 4.1.0).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5500
diff changeset
30 @type list of str
0aa72754d535 Added support for the 'zstd' compression for bundles (as of 4.1.0).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5500
diff changeset
31 @param version Mercurial version info
0aa72754d535 Added support for the 'zstd' compression for bundles (as of 4.1.0).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5500
diff changeset
32 @type tuple of three integers
0aa72754d535 Added support for the 'zstd' compression for bundles (as of 4.1.0).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5500
diff changeset
33 @param parent parent widget
0aa72754d535 Added support for the 'zstd' compression for bundles (as of 4.1.0).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5500
diff changeset
34 @type QWidget
199
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
35 """
2525
8b507a9a2d40 Script changes: Future import added, super calls modified and unicode behavior for str.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2302
diff changeset
36 super(HgBundleDialog, self).__init__(parent)
199
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
37 self.setupUi(self)
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
38
1017
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
39 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False)
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
40
5678
0aa72754d535 Added support for the 'zstd' compression for bundles (as of 4.1.0).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5500
diff changeset
41 self.__version = version
0aa72754d535 Added support for the 'zstd' compression for bundles (as of 4.1.0).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5500
diff changeset
42
0aa72754d535 Added support for the 'zstd' compression for bundles (as of 4.1.0).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5500
diff changeset
43 bundleTypes = ["", "bzip2", "gzip", "none"]
0aa72754d535 Added support for the 'zstd' compression for bundles (as of 4.1.0).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5500
diff changeset
44 if version >= (4, 1, 0):
0aa72754d535 Added support for the 'zstd' compression for bundles (as of 4.1.0).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5500
diff changeset
45 bundleTypes.insert(-1, "zstd")
0aa72754d535 Added support for the 'zstd' compression for bundles (as of 4.1.0).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5500
diff changeset
46 self.compressionCombo.addItems(bundleTypes)
739
efbfe57c8219 Modified some list(sorted(...)) calls.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 202
diff changeset
47 self.tagCombo.addItems(sorted(tagsList))
efbfe57c8219 Modified some list(sorted(...)) calls.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 202
diff changeset
48 self.branchCombo.addItems(["default"] + sorted(branchesList))
1017
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
49 if bookmarksList is not None:
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
50 self.bookmarkCombo.addItems(sorted(bookmarksList))
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
51 else:
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
52 self.bookmarkButton.setHidden(True)
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
53 self.bookmarkCombo.setHidden(True)
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
54
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
55 def __updateOK(self):
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
56 """
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
57 Private slot to update the OK button.
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
58 """
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
59 enabled = True
1274
442c748018c5 Added code to the Mercurial plug-in to support multiple revisions where appropriate.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1131
diff changeset
60 if self.multipleButton.isChecked():
442c748018c5 Added code to the Mercurial plug-in to support multiple revisions where appropriate.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1131
diff changeset
61 enabled = self.multipleEdit.toPlainText() != ""
1017
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
62 elif self.tagButton.isChecked():
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
63 enabled = self.tagCombo.currentText() != ""
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
64 elif self.branchButton.isChecked():
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
65 enabled = self.branchCombo.currentText() != ""
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
66 elif self.bookmarkButton.isChecked():
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
67 enabled = self.bookmarkCombo.currentText() != ""
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
68
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
69 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(enabled)
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
70
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
71 @pyqtSlot(bool)
1274
442c748018c5 Added code to the Mercurial plug-in to support multiple revisions where appropriate.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1131
diff changeset
72 def on_multipleButton_toggled(self, checked):
1017
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
73 """
1274
442c748018c5 Added code to the Mercurial plug-in to support multiple revisions where appropriate.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1131
diff changeset
74 Private slot to handle changes of the Multiple select button.
1017
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
75
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
76 @param checked state of the button (boolean)
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
77 """
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
78 self.__updateOK()
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
79
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
80 @pyqtSlot(bool)
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
81 def on_tagButton_toggled(self, checked):
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
82 """
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
83 Private slot to handle changes of the Tag select button.
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
84
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
85 @param checked state of the button (boolean)
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
86 """
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
87 self.__updateOK()
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
88
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
89 @pyqtSlot(bool)
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
90 def on_branchButton_toggled(self, checked):
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
91 """
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
92 Private slot to handle changes of the Branch select button.
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
93
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
94 @param checked state of the button (boolean)
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
95 """
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
96 self.__updateOK()
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
97
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
98 @pyqtSlot(bool)
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
99 def on_bookmarkButton_toggled(self, checked):
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
100 """
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
101 Private slot to handle changes of the Bookmark select button.
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
102
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
103 @param checked state of the button (boolean)
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
104 """
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
105 self.__updateOK()
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
106
1274
442c748018c5 Added code to the Mercurial plug-in to support multiple revisions where appropriate.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1131
diff changeset
107 @pyqtSlot()
442c748018c5 Added code to the Mercurial plug-in to support multiple revisions where appropriate.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1131
diff changeset
108 def on_multipleEdit_textChanged(self):
1017
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
109 """
1274
442c748018c5 Added code to the Mercurial plug-in to support multiple revisions where appropriate.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1131
diff changeset
110 Private slot to handle changes of the Multiple edit.
1017
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
111 """
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
112 self.__updateOK()
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
113
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
114 @pyqtSlot(str)
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
115 def on_tagCombo_editTextChanged(self, txt):
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
116 """
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
117 Private slot to handle changes of the Tag combo.
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
118
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
119 @param txt text of the combo (string)
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
120 """
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
121 self.__updateOK()
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
122
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
123 @pyqtSlot(str)
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
124 def on_branchCombo_editTextChanged(self, txt):
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
125 """
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
126 Private slot to handle changes of the Branch combo.
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
127
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
128 @param txt text of the combo (string)
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
129 """
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
130 self.__updateOK()
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
131
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
132 @pyqtSlot(str)
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
133 def on_bookmarkCombo_editTextChanged(self, txt):
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
134 """
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
135 Private slot to handle changes of the Bookmark combo.
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
136
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
137 @param txt text of the combo (string)
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
138 """
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
139 self.__updateOK()
199
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
140
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
141 def getParameters(self):
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
142 """
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
143 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
144
3008
7848489bcb92 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
145 @return tuple naming the revisions, base revisions, the compression
7848489bcb92 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
146 type and a flag indicating to bundle all changesets (string,
7848489bcb92 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
147 string, boolean)
199
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
148 """
1274
442c748018c5 Added code to the Mercurial plug-in to support multiple revisions where appropriate.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1131
diff changeset
149 if self.multipleButton.isChecked():
5500
5e723c249586 Fixed a potential issue in the Mercurial bundle dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5389
diff changeset
150 revs = [rev.strip() for rev in
5e723c249586 Fixed a potential issue in the Mercurial bundle dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5389
diff changeset
151 self.multipleEdit.toPlainText().strip().splitlines()
5e723c249586 Fixed a potential issue in the Mercurial bundle dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5389
diff changeset
152 if rev.strip()]
199
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
153 elif self.tagButton.isChecked():
1274
442c748018c5 Added code to the Mercurial plug-in to support multiple revisions where appropriate.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1131
diff changeset
154 revs = [self.tagCombo.currentText()]
199
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
155 elif self.branchButton.isChecked():
1274
442c748018c5 Added code to the Mercurial plug-in to support multiple revisions where appropriate.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1131
diff changeset
156 revs = [self.branchCombo.currentText()]
1017
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
157 elif self.bookmarkButton.isChecked():
1274
442c748018c5 Added code to the Mercurial plug-in to support multiple revisions where appropriate.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1131
diff changeset
158 revs = [self.bookmarkCombo.currentText()]
199
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
159 else:
1274
442c748018c5 Added code to the Mercurial plug-in to support multiple revisions where appropriate.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1131
diff changeset
160 revs = []
199
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
161
5500
5e723c249586 Fixed a potential issue in the Mercurial bundle dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5389
diff changeset
162 baseRevs = [rev.strip() for rev in
5e723c249586 Fixed a potential issue in the Mercurial bundle dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5389
diff changeset
163 self.baseRevisionsEdit.toPlainText().strip().splitlines()
5e723c249586 Fixed a potential issue in the Mercurial bundle dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5389
diff changeset
164 if rev.strip()]
1274
442c748018c5 Added code to the Mercurial plug-in to support multiple revisions where appropriate.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1131
diff changeset
165
5678
0aa72754d535 Added support for the 'zstd' compression for bundles (as of 4.1.0).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5500
diff changeset
166 bundleType = self.compressionCombo.currentText()
0aa72754d535 Added support for the 'zstd' compression for bundles (as of 4.1.0).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5500
diff changeset
167 if bundleType == "zstd":
0aa72754d535 Added support for the 'zstd' compression for bundles (as of 4.1.0).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5500
diff changeset
168 bundleType += "-v2"
0aa72754d535 Added support for the 'zstd' compression for bundles (as of 4.1.0).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5500
diff changeset
169
0aa72754d535 Added support for the 'zstd' compression for bundles (as of 4.1.0).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5500
diff changeset
170 return (revs, baseRevs, bundleType, self.allCheckBox.isChecked())

eric ide

mercurial