21 def __init__(self, vcs, repodir, parent=None): |
21 def __init__(self, vcs, repodir, parent=None): |
22 """ |
22 """ |
23 Constructor |
23 Constructor |
24 |
24 |
25 @param vcs reference to the git object |
25 @param vcs reference to the git object |
26 @param repodir directory name of the local repository (string) |
26 @type Git |
27 @param parent reference to the parent widget (QWidget) |
27 @param repodir directory name of the local repository |
|
28 @type str |
|
29 @param parent reference to the parent widget |
|
30 @type QWidget |
28 """ |
31 """ |
29 super().__init__(parent) |
32 super().__init__(parent) |
30 self.setupUi(self) |
33 self.setupUi(self) |
31 |
34 |
32 self.__vcs = vcs |
35 self.__vcs = vcs |
72 @pyqtSlot(str) |
75 @pyqtSlot(str) |
73 def on_remotesComboBox_currentTextChanged(self, txt): |
76 def on_remotesComboBox_currentTextChanged(self, txt): |
74 """ |
77 """ |
75 Private slot to handle changes of the selected repository. |
78 Private slot to handle changes of the selected repository. |
76 |
79 |
77 @param txt current text of the combo box (string) |
80 @param txt current text of the combo box |
|
81 @type str |
78 """ |
82 """ |
79 self.remoteEdit.setReadOnly(txt != self.__custom) |
83 self.remoteEdit.setReadOnly(txt != self.__custom) |
80 self.remoteBranchesList.setEnabled(txt != self.__all) |
84 self.remoteBranchesList.setEnabled(txt != self.__all) |
81 self.remoteEdit.clear() |
85 self.remoteEdit.clear() |
82 self.remoteBranchesList.clear() |
86 self.remoteBranchesList.clear() |
93 @pyqtSlot(str) |
97 @pyqtSlot(str) |
94 def on_remoteEdit_textChanged(self, txt): |
98 def on_remoteEdit_textChanged(self, txt): |
95 """ |
99 """ |
96 Private slot to handle changes of the URL edit. |
100 Private slot to handle changes of the URL edit. |
97 |
101 |
98 @param txt current text of the URL edit (string) |
102 @param txt current text of the URL edit |
|
103 @type str |
99 """ |
104 """ |
100 self.__updateButtonEnable() |
105 self.__updateButtonEnable() |
101 |
106 |
102 if self.remotesComboBox.currentText() == self.__custom and txt != "": |
107 if self.remotesComboBox.currentText() == self.__custom and txt != "": |
103 remoteBranches = self.__vcs.gitGetRemoteBranchesList(self.__repodir, txt) |
108 remoteBranches = self.__vcs.gitGetRemoteBranchesList(self.__repodir, txt) |
133 Public method to get the entered data. |
138 Public method to get the entered data. |
134 |
139 |
135 @return tuple of remote name, remote url (for custom remotes), |
140 @return tuple of remote name, remote url (for custom remotes), |
136 remote branches, a flag indicating to pull from all repositories |
141 remote branches, a flag indicating to pull from all repositories |
137 and a flag indicating to remove obsolete tracking references |
142 and a flag indicating to remove obsolete tracking references |
138 (string, string, list of strings, boolean, boolean) |
143 @rtype tuple of (str, str, list of str, bool, bool) |
139 """ |
144 """ |
140 remote = "" |
145 remote = "" |
141 url = "" |
146 url = "" |
142 branches = [] |
147 branches = [] |
143 allRepos = False |
148 allRepos = False |