src/eric7/Plugins/VcsPlugins/vcsMercurial/HgBundleDialog.py

Mon, 22 Apr 2024 18:23:20 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 22 Apr 2024 18:23:20 +0200
branch
eric7
changeset 10690
fab36645aa7d
parent 10439
21c28b0f9e41
child 11090
f5f5f5803935
permissions
-rw-r--r--

Changed the source code and the source code documentation to improve the indication of unused method/function arguments.

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
10439
21c28b0f9e41 Updated copyright for 2024.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10438
diff changeset
3 # Copyright (c) 2010 - 2024 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
8318
962bce857696 Replaced all imports of PyQt5 to PyQt6 and started to replace code using obsoleted methods and adapt to the PyQt6 enum usage.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8312
diff changeset
10 from PyQt6.QtCore import pyqtSlot
962bce857696 Replaced all imports of PyQt5 to PyQt6 and started to replace code using obsoleted methods and adapt to the PyQt6 enum usage.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8312
diff changeset
11 from PyQt6.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 """
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
20
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
21 def __init__(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
22 self, tagsList, branchesList, bookmarksList=None, version=(0, 0, 0), parent=None
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
23 ):
199
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
24 """
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
25 Constructor
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
26
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
27 @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
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 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
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 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
32 @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
33 @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
34 @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
35 @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
36 @type QWidget
199
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
37 """
8218
7c09585bd960 Applied some more code simplifications suggested by the new Simplify checker (super(Foo, self) => super()).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8143
diff changeset
38 super().__init__(parent)
199
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
39 self.setupUi(self)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
40
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
41 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(False)
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
42
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
43 self.__version = version
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
44
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
45 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
46 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
47 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
48 self.compressionCombo.addItems(bundleTypes)
739
efbfe57c8219 Modified some list(sorted(...)) calls.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 202
diff changeset
49 self.tagCombo.addItems(sorted(tagsList))
efbfe57c8219 Modified some list(sorted(...)) calls.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 202
diff changeset
50 self.branchCombo.addItems(["default"] + sorted(branchesList))
1017
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
51 if bookmarksList is not None:
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
52 self.bookmarkCombo.addItems(sorted(bookmarksList))
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
53 else:
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
54 self.bookmarkButton.setHidden(True)
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
55 self.bookmarkCombo.setHidden(True)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
56
1017
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
57 def __updateOK(self):
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 Private slot to update the OK button.
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
60 """
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
61 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
62 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
63 enabled = self.multipleEdit.toPlainText() != ""
1017
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
64 elif self.tagButton.isChecked():
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
65 enabled = self.tagCombo.currentText() != ""
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
66 elif self.branchButton.isChecked():
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
67 enabled = self.branchCombo.currentText() != ""
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
68 elif self.bookmarkButton.isChecked():
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
69 enabled = self.bookmarkCombo.currentText() != ""
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
70
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
71 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(enabled)
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
72
1017
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
73 @pyqtSlot(bool)
10690
fab36645aa7d Changed the source code and the source code documentation to improve the indication of unused method/function arguments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10439
diff changeset
74 def on_multipleButton_toggled(self, _checked):
1017
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
75 """
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
76 Private slot to handle changes of the Multiple select button.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
77
10690
fab36645aa7d Changed the source code and the source code documentation to improve the indication of unused method/function arguments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10439
diff changeset
78 @param _checked state of the button (unused)
10438
4cd7e5a8b3cf Converted some source code documentation to the new style.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9653
diff changeset
79 @type bool
1017
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
80 """
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
81 self.__updateOK()
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
82
1017
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
83 @pyqtSlot(bool)
10690
fab36645aa7d Changed the source code and the source code documentation to improve the indication of unused method/function arguments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10439
diff changeset
84 def on_tagButton_toggled(self, _checked):
1017
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
85 """
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
86 Private slot to handle changes of the Tag select button.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
87
10690
fab36645aa7d Changed the source code and the source code documentation to improve the indication of unused method/function arguments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10439
diff changeset
88 @param _checked state of the button (unused)
10438
4cd7e5a8b3cf Converted some source code documentation to the new style.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9653
diff changeset
89 @type bool
1017
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
90 """
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
91 self.__updateOK()
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
92
1017
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
93 @pyqtSlot(bool)
10690
fab36645aa7d Changed the source code and the source code documentation to improve the indication of unused method/function arguments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10439
diff changeset
94 def on_branchButton_toggled(self, _checked):
1017
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 Private slot to handle changes of the Branch select button.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
97
10690
fab36645aa7d Changed the source code and the source code documentation to improve the indication of unused method/function arguments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10439
diff changeset
98 @param _checked state of the button (unused)
10438
4cd7e5a8b3cf Converted some source code documentation to the new style.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9653
diff changeset
99 @type bool
1017
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 self.__updateOK()
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
102
1017
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
103 @pyqtSlot(bool)
10690
fab36645aa7d Changed the source code and the source code documentation to improve the indication of unused method/function arguments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10439
diff changeset
104 def on_bookmarkButton_toggled(self, _checked):
1017
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
105 """
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
106 Private slot to handle changes of the Bookmark select button.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
107
10690
fab36645aa7d Changed the source code and the source code documentation to improve the indication of unused method/function arguments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10439
diff changeset
108 @param _checked state of the button (unused)
10438
4cd7e5a8b3cf Converted some source code documentation to the new style.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9653
diff changeset
109 @type bool
1017
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
110 """
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
111 self.__updateOK()
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
112
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
113 @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
114 def on_multipleEdit_textChanged(self):
1017
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
115 """
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
116 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
117 """
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
118 self.__updateOK()
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
119
1017
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
120 @pyqtSlot(str)
10690
fab36645aa7d Changed the source code and the source code documentation to improve the indication of unused method/function arguments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10439
diff changeset
121 def on_tagCombo_editTextChanged(self, _txt):
1017
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 Private slot to handle changes of the Tag combo.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
124
10690
fab36645aa7d Changed the source code and the source code documentation to improve the indication of unused method/function arguments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10439
diff changeset
125 @param _txt text of the combo (unused)
10438
4cd7e5a8b3cf Converted some source code documentation to the new style.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9653
diff changeset
126 @type str
1017
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 self.__updateOK()
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
129
1017
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
130 @pyqtSlot(str)
10690
fab36645aa7d Changed the source code and the source code documentation to improve the indication of unused method/function arguments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10439
diff changeset
131 def on_branchCombo_editTextChanged(self, _txt):
1017
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
132 """
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
133 Private slot to handle changes of the Branch combo.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
134
10690
fab36645aa7d Changed the source code and the source code documentation to improve the indication of unused method/function arguments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10439
diff changeset
135 @param _txt text of the combo (unused)
10438
4cd7e5a8b3cf Converted some source code documentation to the new style.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9653
diff changeset
136 @type str
1017
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
137 """
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
138 self.__updateOK()
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
139
1017
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
140 @pyqtSlot(str)
10690
fab36645aa7d Changed the source code and the source code documentation to improve the indication of unused method/function arguments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10439
diff changeset
141 def on_bookmarkCombo_editTextChanged(self, _txt):
1017
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
142 """
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
143 Private slot to handle changes of the Bookmark combo.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
144
10690
fab36645aa7d Changed the source code and the source code documentation to improve the indication of unused method/function arguments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10439
diff changeset
145 @param _txt text of the combo (unused)
10438
4cd7e5a8b3cf Converted some source code documentation to the new style.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9653
diff changeset
146 @type str
1017
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
147 """
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
148 self.__updateOK()
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
149
199
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
150 def getParameters(self):
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
151 """
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
152 Public method to retrieve the bundle data.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
153
3008
7848489bcb92 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
154 @return tuple naming the revisions, base revisions, the compression
10438
4cd7e5a8b3cf Converted some source code documentation to the new style.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9653
diff changeset
155 type and a flag indicating to bundle all changesets
4cd7e5a8b3cf Converted some source code documentation to the new style.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9653
diff changeset
156 @rtype tuple of (str, str, bool)
199
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
157 """
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 if self.multipleButton.isChecked():
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
159 revs = [
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
160 rev.strip()
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
161 for rev in self.multipleEdit.toPlainText().strip().splitlines()
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
162 if rev.strip()
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
163 ]
199
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
164 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
165 revs = [self.tagCombo.currentText()]
199
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
166 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
167 revs = [self.branchCombo.currentText()]
1017
919147f2b518 Continued with Mercurial bookmark support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
168 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
169 revs = [self.bookmarkCombo.currentText()]
199
675623ee5d7d Added changegroup related actions to the Mercurial plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
170 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
171 revs = []
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
172
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
173 baseRevs = [
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
174 rev.strip()
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
175 for rev in self.baseRevisionsEdit.toPlainText().strip().splitlines()
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
176 if rev.strip()
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
177 ]
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
178
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
179 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
180 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
181 bundleType += "-v2"
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
182
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
183 return (revs, baseRevs, bundleType, self.allCheckBox.isChecked())

eric ide

mercurial