Plugins/VcsPlugins/vcsMercurial/RebaseExtension/HgRebaseDialog.py

Thu, 13 Mar 2014 19:21:25 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 13 Mar 2014 19:21:25 +0100
changeset 3366
6084bb3c3911
parent 3337
49faa820151a
child 3484
645c12de6b0c
permissions
-rw-r--r--

Made some changes to have a bunch of dialogs with correct sizes.

1093
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
3160
209a07d7e401 Updated copyright for 2014.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3008
diff changeset
3 # Copyright (c) 2011 - 2014 Detlev Offenbach <detlev@die-offenbachs.de>
1093
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 Module implementing a dialog to enter the data for a rebase session.
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
10 from PyQt4.QtCore import pyqtSlot
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
11 from PyQt4.QtGui import QDialog, QDialogButtonBox
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
12
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
13 from .Ui_HgRebaseDialog import Ui_HgRebaseDialog
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
14
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
15
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
16 class HgRebaseDialog(QDialog, Ui_HgRebaseDialog):
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
17 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18 Class implementing a dialog to enter the data for a rebase session.
47bc4ef30315 Added support for the Mercurial rebase extension.
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: 2632
diff changeset
20 def __init__(self, tagsList, branchesList, bookmarksList=None,
7848489bcb92 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2632
diff changeset
21 parent=None):
1093
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
22 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
23 Constructor
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
24
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
25 @param tagsList list of tags (list of strings)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
26 @param branchesList list of branches (list of strings)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
27 @param bookmarksList list of bookmarks (list of strings)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
28 @param parent reference to the parent widget (QWidget)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
29 """
1131
7781e396c903 Changed the code to use super() to access the superclass.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1093
diff changeset
30 super().__init__(parent)
1093
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
31 self.setupUi(self)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
32
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
33 self.tag1Combo.addItems(sorted(tagsList))
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
34 self.tag2Combo.addItems(sorted(tagsList))
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
35 self.branch1Combo.addItems(["default"] + sorted(branchesList))
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
36 self.branch2Combo.addItems(["default"] + sorted(branchesList))
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
37 if bookmarksList is not None:
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
38 self.bookmark1Combo.addItems(sorted(bookmarksList))
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
39 self.bookmark2Combo.addItems(sorted(bookmarksList))
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
40 else:
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
41 self.bookmark1Button.setHidden(True)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
42 self.bookmark1Combo.setHidden(True)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
43 self.bookmark2Button.setHidden(True)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
44 self.bookmark2Combo.setHidden(True)
3366
6084bb3c3911 Made some changes to have a bunch of dialogs with correct sizes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3337
diff changeset
45
6084bb3c3911 Made some changes to have a bunch of dialogs with correct sizes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3337
diff changeset
46 msh = self.minimumSizeHint()
6084bb3c3911 Made some changes to have a bunch of dialogs with correct sizes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3337
diff changeset
47 self.resize(max(self.width(), msh.width()), msh.height())
1093
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
48
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
49 def __updateOK(self):
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
50 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
51 Private slot to update the OK button.
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
52 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
53 enabled = True
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
54 if not self.parentButton.isChecked():
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
55 if self.id1Button.isChecked():
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
56 enabled = enabled and self.id1Edit.text() != ""
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
57 elif self.tag1Button.isChecked():
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
58 enabled = enabled and self.tag1Combo.currentText() != ""
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
59 elif self.branch1Button.isChecked():
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
60 enabled = enabled and self.branch1Combo.currentText() != ""
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
61 elif self.bookmark1Button.isChecked():
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
62 enabled = enabled and self.bookmark1Combo.currentText() != ""
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
63
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
64 if self.id2Button.isChecked():
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
65 enabled = enabled and self.id2Edit.text() != ""
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
66 elif self.tag2Button.isChecked():
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
67 enabled = enabled and self.tag2Combo.currentText() != ""
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
68 elif self.branch2Button.isChecked():
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
69 enabled = enabled and self.branch2Combo.currentText() != ""
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
70 elif self.bookmark2Button.isChecked():
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
71 enabled = enabled and self.bookmark2Combo.currentText() != ""
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
72
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
73 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(enabled)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
74
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
75 @pyqtSlot(bool)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
76 def on_id1Button_toggled(self, checked):
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
77 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
78 Private slot to handle changes of the ID1 select button.
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
79
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
80 @param checked state of the button (boolean)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
81 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
82 self.__updateOK()
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
83
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
84 @pyqtSlot(bool)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
85 def on_id2Button_toggled(self, checked):
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
86 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
87 Private slot to handle changes of the ID2 select button.
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
88
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
89 @param checked state of the button (boolean)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
90 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
91 self.__updateOK()
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
92
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
93 @pyqtSlot(bool)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
94 def on_tag1Button_toggled(self, checked):
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
95 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
96 Private slot to handle changes of the Tag1 select button.
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
97
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
98 @param checked state of the button (boolean)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
99 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
100 self.__updateOK()
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
101
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
102 @pyqtSlot(bool)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
103 def on_tag2Button_toggled(self, checked):
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
104 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
105 Private slot to handle changes of the Tag2 select button.
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
106
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
107 @param checked state of the button (boolean)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
108 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
109 self.__updateOK()
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
110
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
111 @pyqtSlot(bool)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
112 def on_branch1Button_toggled(self, checked):
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
113 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
114 Private slot to handle changes of the Branch1 select button.
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
115
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
116 @param checked state of the button (boolean)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
117 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
118 self.__updateOK()
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
119
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
120 @pyqtSlot(bool)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
121 def on_branch2Button_toggled(self, checked):
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
122 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
123 Private slot to handle changes of the Branch2 select button.
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
124
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
125 @param checked state of the button (boolean)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
126 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
127 self.__updateOK()
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
128
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
129 @pyqtSlot(bool)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
130 def on_bookmark1Button_toggled(self, checked):
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
131 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
132 Private slot to handle changes of the Bookmark1 select button.
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
133
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
134 @param checked state of the button (boolean)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
135 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
136 self.__updateOK()
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
137
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
138 @pyqtSlot(bool)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
139 def on_bookmark2Button_toggled(self, checked):
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
140 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
141 Private slot to handle changes of the Bookmark2 select button.
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
142
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
143 @param checked state of the button (boolean)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
144 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
145 self.__updateOK()
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
146
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
147 @pyqtSlot(str)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
148 def on_id1Edit_textChanged(self, txt):
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
149 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
150 Private slot to handle changes of the ID1 edit.
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
151
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
152 @param txt text of the edit (string)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
153 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
154 self.__updateOK()
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
155
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
156 @pyqtSlot(str)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
157 def on_id2Edit_textChanged(self, txt):
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
158 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
159 Private slot to handle changes of the ID2 edit.
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
160
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
161 @param txt text of the edit (string)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
162 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
163 self.__updateOK()
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
164
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
165 @pyqtSlot(str)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
166 def on_tag1Combo_editTextChanged(self, txt):
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
167 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
168 Private slot to handle changes of the Tag1 combo.
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
169
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
170 @param txt text of the combo (string)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
171 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
172 self.__updateOK()
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
173
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
174 @pyqtSlot(str)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
175 def on_tag2Combo_editTextChanged(self, txt):
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
176 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
177 Private slot to handle changes of the Tag2 combo.
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
178
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
179 @param txt text of the combo (string)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
180 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
181 self.__updateOK()
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
182
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
183 @pyqtSlot(str)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
184 def on_branch1Combo_editTextChanged(self, txt):
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
185 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
186 Private slot to handle changes of the Branch1 combo.
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
187
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
188 @param txt text of the combo (string)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
189 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
190 self.__updateOK()
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
191
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
192 @pyqtSlot(str)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
193 def on_branch2Combo_editTextChanged(self, txt):
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
194 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
195 Private slot to handle changes of the Branch2 combo.
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
196
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
197 @param txt text of the combo (string)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
198 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
199 self.__updateOK()
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
200
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
201 @pyqtSlot(str)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
202 def on_bookmark1Combo_editTextChanged(self, txt):
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
203 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
204 Private slot to handle changes of the Bookmark1 combo.
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
205
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
206 @param txt text of the combo (string)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
207 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
208 self.__updateOK()
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
209
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
210 @pyqtSlot(str)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
211 def on_bookmark2Combo_editTextChanged(self, txt):
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
212 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
213 Private slot to handle changes of the Bookmark2 combo.
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
214
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
215 @param txt text of the combo (string)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
216 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
217 self.__updateOK()
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
218
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
219 def __getRevision(self, no):
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
220 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
221 Private method to generate the revision.
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
222
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
223 @param no revision number to generate (1 or 2)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
224 @return revision (string)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
225 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
226 if no == 1:
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
227 numberButton = self.number1Button
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
228 numberSpinBox = self.number1SpinBox
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
229 idButton = self.id1Button
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
230 idEdit = self.id1Edit
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
231 tagButton = self.tag1Button
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
232 tagCombo = self.tag1Combo
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
233 branchButton = self.branch1Button
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
234 branchCombo = self.branch1Combo
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
235 bookmarkButton = self.bookmark1Button
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
236 bookmarkCombo = self.bookmark1Combo
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
237 tipButton = None
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
238 else:
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
239 numberButton = self.number2Button
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
240 numberSpinBox = self.number2SpinBox
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
241 idButton = self.id2Button
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
242 idEdit = self.id2Edit
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
243 tagButton = self.tag2Button
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
244 tagCombo = self.tag2Combo
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
245 branchButton = self.branch2Button
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
246 branchCombo = self.branch2Combo
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
247 bookmarkButton = self.bookmark2Button
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
248 bookmarkCombo = self.bookmark2Combo
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
249 tipButton = self.tip2Button
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
250
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
251 if numberButton.isChecked():
3337
49faa820151a Corrected some Mercurial input dialogs offering to enter either a revision number or a changeset id to use rev() and id() to make the operation unambigous.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
252 return "rev({0})".format(numberSpinBox.value())
1093
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
253 elif idButton.isChecked():
3337
49faa820151a Corrected some Mercurial input dialogs offering to enter either a revision number or a changeset id to use rev() and id() to make the operation unambigous.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
254 return "id({0})".format(idEdit.text())
1093
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
255 elif tagButton.isChecked():
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
256 return tagCombo.currentText()
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
257 elif branchButton.isChecked():
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
258 return branchCombo.currentText()
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
259 elif bookmarkButton.isChecked():
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
260 return bookmarkCombo.currentText()
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
261 elif tipButton and tipButton.isChecked():
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
262 return ""
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
263
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
264 def getData(self):
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
265 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
266 Private method to retrieve the data for the rebase session.
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
267
3008
7848489bcb92 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2632
diff changeset
268 @return tuple with a source indicator of "S" or "B", the source
7848489bcb92 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2632
diff changeset
269 revision, the destination revision, a flag indicating to collapse,
7848489bcb92 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2632
diff changeset
270 a flag indicating to keep the original changesets, a flag
7848489bcb92 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2632
diff changeset
271 indicating to keep the original branch name and a flag indicating
7848489bcb92 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2632
diff changeset
272 to detach the source (string, string, string, boolean, boolean,
7848489bcb92 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2632
diff changeset
273 boolean, boolean)
1093
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
274 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
275 if self.sourceButton.isChecked():
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
276 indicator = "S"
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
277 elif self.baseButton.isChecked():
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
278 indicator = "B"
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
279 else:
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
280 indicator = ""
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
281 if indicator:
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
282 rev1 = self.__getRevision(1)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
283 else:
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
284 rev1 = ""
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
285
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
286 return (
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
287 indicator,
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
288 rev1,
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
289 self.__getRevision(2),
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
290 self.collapseCheckBox.isChecked(),
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
291 self.keepChangesetsCheckBox.isChecked(),
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
292 self.keepBranchCheckBox.isChecked(),
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
293 self.detachCheckBox.isChecked()
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
294 )

eric ide

mercurial