src/eric7/Plugins/VcsPlugins/vcsGit/ProjectHelper.py

branch
eric7
changeset 9221
bf71ee032bb4
parent 9209
b99e7fd55fd3
child 9413
80c06d472826
equal deleted inserted replaced
9220:e9e7eca7efee 9221:bf71ee032bb4
24 24
25 class GitProjectHelper(VcsProjectHelper): 25 class GitProjectHelper(VcsProjectHelper):
26 """ 26 """
27 Class implementing the VCS project helper for Git. 27 Class implementing the VCS project helper for Git.
28 """ 28 """
29
29 def __init__(self, vcsObject, projectObject, parent=None, name=None): 30 def __init__(self, vcsObject, projectObject, parent=None, name=None):
30 """ 31 """
31 Constructor 32 Constructor
32 33
33 @param vcsObject reference to the vcs object 34 @param vcsObject reference to the vcs object
34 @param projectObject reference to the project object 35 @param projectObject reference to the project object
35 @param parent parent widget (QWidget) 36 @param parent parent widget (QWidget)
36 @param name name of this object (string) 37 @param name name of this object (string)
37 """ 38 """
38 VcsProjectHelper.__init__(self, vcsObject, projectObject, parent, name) 39 VcsProjectHelper.__init__(self, vcsObject, projectObject, parent, name)
39 40
40 def setObjects(self, vcsObject, projectObject): 41 def setObjects(self, vcsObject, projectObject):
41 """ 42 """
42 Public method to set references to the vcs and project objects. 43 Public method to set references to the vcs and project objects.
43 44
44 @param vcsObject reference to the vcs object 45 @param vcsObject reference to the vcs object
45 @param projectObject reference to the project object 46 @param projectObject reference to the project object
46 """ 47 """
47 self.vcs = vcsObject 48 self.vcs = vcsObject
48 self.project = projectObject 49 self.project = projectObject
49 50
50 def getProject(self): 51 def getProject(self):
51 """ 52 """
52 Public method to get a reference to the project object. 53 Public method to get a reference to the project object.
53 54
54 @return reference to the project object (Project) 55 @return reference to the project object (Project)
55 """ 56 """
56 return self.project 57 return self.project
57 58
58 def getActions(self): 59 def getActions(self):
59 """ 60 """
60 Public method to get a list of all actions. 61 Public method to get a list of all actions.
61 62
62 @return list of all actions (list of EricAction) 63 @return list of all actions (list of EricAction)
63 """ 64 """
64 actions = self.actions[:] 65 actions = self.actions[:]
65 return actions 66 return actions
66 67
67 def initActions(self): 68 def initActions(self):
68 """ 69 """
69 Public method to generate the action objects. 70 Public method to generate the action objects.
70 """ 71 """
71 self.vcsNewAct = EricAction( 72 self.vcsNewAct = EricAction(
72 self.tr('New from repository'), 73 self.tr("New from repository"),
73 UI.PixmapCache.getIcon("vcsCheckout"), 74 UI.PixmapCache.getIcon("vcsCheckout"),
74 self.tr('&New from repository...'), 0, 0, 75 self.tr("&New from repository..."),
75 self, 'git_new') 76 0,
76 self.vcsNewAct.setStatusTip(self.tr( 77 0,
77 'Create (clone) a new project from a Git repository' 78 self,
78 )) 79 "git_new",
79 self.vcsNewAct.setWhatsThis(self.tr( 80 )
80 """<b>New from repository</b>""" 81 self.vcsNewAct.setStatusTip(
81 """<p>This creates (clones) a new local project from """ 82 self.tr("Create (clone) a new project from a Git repository")
82 """a Git repository.</p>""" 83 )
83 )) 84 self.vcsNewAct.setWhatsThis(
85 self.tr(
86 """<b>New from repository</b>"""
87 """<p>This creates (clones) a new local project from """
88 """a Git repository.</p>"""
89 )
90 )
84 self.vcsNewAct.triggered.connect(self._vcsCheckout) 91 self.vcsNewAct.triggered.connect(self._vcsCheckout)
85 self.actions.append(self.vcsNewAct) 92 self.actions.append(self.vcsNewAct)
86 93
87 self.gitFetchAct = EricAction( 94 self.gitFetchAct = EricAction(
88 self.tr('Fetch changes'), 95 self.tr("Fetch changes"),
89 UI.PixmapCache.getIcon("vcsUpdate"), 96 UI.PixmapCache.getIcon("vcsUpdate"),
90 self.tr('Fetch changes'), 97 self.tr("Fetch changes"),
91 0, 0, self, 'git_fetch') 98 0,
92 self.gitFetchAct.setStatusTip(self.tr( 99 0,
93 'Fetch changes from a remote repository' 100 self,
94 )) 101 "git_fetch",
95 self.gitFetchAct.setWhatsThis(self.tr( 102 )
96 """<b>Fetch changes</b>""" 103 self.gitFetchAct.setStatusTip(self.tr("Fetch changes from a remote repository"))
97 """<p>This fetches changes from a remote repository into the """ 104 self.gitFetchAct.setWhatsThis(
98 """local repository.</p>""" 105 self.tr(
99 )) 106 """<b>Fetch changes</b>"""
107 """<p>This fetches changes from a remote repository into the """
108 """local repository.</p>"""
109 )
110 )
100 self.gitFetchAct.triggered.connect(self.__gitFetch) 111 self.gitFetchAct.triggered.connect(self.__gitFetch)
101 self.actions.append(self.gitFetchAct) 112 self.actions.append(self.gitFetchAct)
102 113
103 self.gitPullAct = EricAction( 114 self.gitPullAct = EricAction(
104 self.tr('Pull changes'), 115 self.tr("Pull changes"),
105 UI.PixmapCache.getIcon("vcsUpdate"), 116 UI.PixmapCache.getIcon("vcsUpdate"),
106 self.tr('Pull changes'), 117 self.tr("Pull changes"),
107 0, 0, self, 'git_pull') 118 0,
108 self.gitPullAct.setStatusTip(self.tr( 119 0,
109 'Pull changes from a remote repository and update the work area' 120 self,
110 )) 121 "git_pull",
111 self.gitPullAct.setWhatsThis(self.tr( 122 )
112 """<b>Pull changes</b>""" 123 self.gitPullAct.setStatusTip(
113 """<p>This pulls changes from a remote repository into the """ 124 self.tr("Pull changes from a remote repository and update the work area")
114 """local repository and updates the work area.</p>""" 125 )
115 )) 126 self.gitPullAct.setWhatsThis(
127 self.tr(
128 """<b>Pull changes</b>"""
129 """<p>This pulls changes from a remote repository into the """
130 """local repository and updates the work area.</p>"""
131 )
132 )
116 self.gitPullAct.triggered.connect(self.__gitPull) 133 self.gitPullAct.triggered.connect(self.__gitPull)
117 self.actions.append(self.gitPullAct) 134 self.actions.append(self.gitPullAct)
118 135
119 self.vcsCommitAct = EricAction( 136 self.vcsCommitAct = EricAction(
120 self.tr('Commit changes to repository'), 137 self.tr("Commit changes to repository"),
121 UI.PixmapCache.getIcon("vcsCommit"), 138 UI.PixmapCache.getIcon("vcsCommit"),
122 self.tr('Commit changes to repository...'), 0, 0, self, 139 self.tr("Commit changes to repository..."),
123 'git_commit') 140 0,
124 self.vcsCommitAct.setStatusTip(self.tr( 141 0,
125 'Commit changes of the local project to the Git repository' 142 self,
126 )) 143 "git_commit",
127 self.vcsCommitAct.setWhatsThis(self.tr( 144 )
128 """<b>Commit changes to repository</b>""" 145 self.vcsCommitAct.setStatusTip(
129 """<p>This commits changes of the local project to the """ 146 self.tr("Commit changes of the local project to the Git repository")
130 """Git repository.</p>""" 147 )
131 )) 148 self.vcsCommitAct.setWhatsThis(
149 self.tr(
150 """<b>Commit changes to repository</b>"""
151 """<p>This commits changes of the local project to the """
152 """Git repository.</p>"""
153 )
154 )
132 self.vcsCommitAct.triggered.connect(self._vcsCommit) 155 self.vcsCommitAct.triggered.connect(self._vcsCommit)
133 self.actions.append(self.vcsCommitAct) 156 self.actions.append(self.vcsCommitAct)
134 157
135 self.gitPushAct = EricAction( 158 self.gitPushAct = EricAction(
136 self.tr('Push changes'), 159 self.tr("Push changes"),
137 UI.PixmapCache.getIcon("vcsCommit"), 160 UI.PixmapCache.getIcon("vcsCommit"),
138 self.tr('Push changes'), 161 self.tr("Push changes"),
139 0, 0, self, 'git_push') 162 0,
140 self.gitPushAct.setStatusTip(self.tr( 163 0,
141 'Push changes to a remote repository' 164 self,
142 )) 165 "git_push",
143 self.gitPushAct.setWhatsThis(self.tr( 166 )
144 """<b>Push changes</b>""" 167 self.gitPushAct.setStatusTip(self.tr("Push changes to a remote repository"))
145 """<p>This pushes changes from the local repository to a """ 168 self.gitPushAct.setWhatsThis(
146 """remote repository.</p>""" 169 self.tr(
147 )) 170 """<b>Push changes</b>"""
171 """<p>This pushes changes from the local repository to a """
172 """remote repository.</p>"""
173 )
174 )
148 self.gitPushAct.triggered.connect(self.__gitPush) 175 self.gitPushAct.triggered.connect(self.__gitPush)
149 self.actions.append(self.gitPushAct) 176 self.actions.append(self.gitPushAct)
150 177
151 self.vcsExportAct = EricAction( 178 self.vcsExportAct = EricAction(
152 self.tr('Export from repository'), 179 self.tr("Export from repository"),
153 UI.PixmapCache.getIcon("vcsExport"), 180 UI.PixmapCache.getIcon("vcsExport"),
154 self.tr('&Export from repository...'), 181 self.tr("&Export from repository..."),
155 0, 0, self, 'git_export_repo') 182 0,
156 self.vcsExportAct.setStatusTip(self.tr( 183 0,
157 'Export a project from the repository' 184 self,
158 )) 185 "git_export_repo",
159 self.vcsExportAct.setWhatsThis(self.tr( 186 )
160 """<b>Export from repository</b>""" 187 self.vcsExportAct.setStatusTip(self.tr("Export a project from the repository"))
161 """<p>This exports a project from the repository.</p>""" 188 self.vcsExportAct.setWhatsThis(
162 )) 189 self.tr(
190 """<b>Export from repository</b>"""
191 """<p>This exports a project from the repository.</p>"""
192 )
193 )
163 self.vcsExportAct.triggered.connect(self._vcsExport) 194 self.vcsExportAct.triggered.connect(self._vcsExport)
164 self.actions.append(self.vcsExportAct) 195 self.actions.append(self.vcsExportAct)
165 196
166 self.gitLogBrowserAct = EricAction( 197 self.gitLogBrowserAct = EricAction(
167 self.tr('Show log browser'), 198 self.tr("Show log browser"),
168 UI.PixmapCache.getIcon("vcsLog"), 199 UI.PixmapCache.getIcon("vcsLog"),
169 self.tr('Show log browser'), 200 self.tr("Show log browser"),
170 0, 0, self, 'git_log_browser') 201 0,
171 self.gitLogBrowserAct.setStatusTip(self.tr( 202 0,
172 'Show a dialog to browse the log of the local project' 203 self,
173 )) 204 "git_log_browser",
174 self.gitLogBrowserAct.setWhatsThis(self.tr( 205 )
175 """<b>Show log browser</b>""" 206 self.gitLogBrowserAct.setStatusTip(
176 """<p>This shows a dialog to browse the log of the local""" 207 self.tr("Show a dialog to browse the log of the local project")
177 """ project. A limited number of entries is shown first.""" 208 )
178 """ More can be retrieved later on.</p>""" 209 self.gitLogBrowserAct.setWhatsThis(
179 )) 210 self.tr(
211 """<b>Show log browser</b>"""
212 """<p>This shows a dialog to browse the log of the local"""
213 """ project. A limited number of entries is shown first."""
214 """ More can be retrieved later on.</p>"""
215 )
216 )
180 self.gitLogBrowserAct.triggered.connect(self._vcsLogBrowser) 217 self.gitLogBrowserAct.triggered.connect(self._vcsLogBrowser)
181 self.actions.append(self.gitLogBrowserAct) 218 self.actions.append(self.gitLogBrowserAct)
182 219
183 self.gitReflogBrowserAct = EricAction( 220 self.gitReflogBrowserAct = EricAction(
184 self.tr('Show reflog browser'), 221 self.tr("Show reflog browser"),
185 UI.PixmapCache.getIcon("vcsLog"), 222 UI.PixmapCache.getIcon("vcsLog"),
186 self.tr('Show reflog browser'), 223 self.tr("Show reflog browser"),
187 0, 0, self, 'git_reflog_browser') 224 0,
188 self.gitReflogBrowserAct.setStatusTip(self.tr( 225 0,
189 'Show a dialog to browse the reflog of the local project' 226 self,
190 )) 227 "git_reflog_browser",
191 self.gitReflogBrowserAct.setWhatsThis(self.tr( 228 )
192 """<b>Show reflog browser</b>""" 229 self.gitReflogBrowserAct.setStatusTip(
193 """<p>This shows a dialog to browse the reflog of the local""" 230 self.tr("Show a dialog to browse the reflog of the local project")
194 """ project. A limited number of entries is shown first.""" 231 )
195 """ More can be retrieved later on.</p>""" 232 self.gitReflogBrowserAct.setWhatsThis(
196 )) 233 self.tr(
234 """<b>Show reflog browser</b>"""
235 """<p>This shows a dialog to browse the reflog of the local"""
236 """ project. A limited number of entries is shown first."""
237 """ More can be retrieved later on.</p>"""
238 )
239 )
197 self.gitReflogBrowserAct.triggered.connect(self.__gitReflogBrowser) 240 self.gitReflogBrowserAct.triggered.connect(self.__gitReflogBrowser)
198 self.actions.append(self.gitReflogBrowserAct) 241 self.actions.append(self.gitReflogBrowserAct)
199 242
200 self.vcsDiffAct = EricAction( 243 self.vcsDiffAct = EricAction(
201 self.tr('Show differences'), 244 self.tr("Show differences"),
202 UI.PixmapCache.getIcon("vcsDiff"), 245 UI.PixmapCache.getIcon("vcsDiff"),
203 self.tr('Show &differences...'), 246 self.tr("Show &differences..."),
204 0, 0, self, 'git_diff') 247 0,
205 self.vcsDiffAct.setStatusTip(self.tr( 248 0,
206 'Show the differences of the local project to the repository' 249 self,
207 )) 250 "git_diff",
208 self.vcsDiffAct.setWhatsThis(self.tr( 251 )
209 """<b>Show differences</b>""" 252 self.vcsDiffAct.setStatusTip(
210 """<p>This shows differences of the local project to the""" 253 self.tr("Show the differences of the local project to the repository")
211 """ repository.</p>""" 254 )
212 )) 255 self.vcsDiffAct.setWhatsThis(
256 self.tr(
257 """<b>Show differences</b>"""
258 """<p>This shows differences of the local project to the"""
259 """ repository.</p>"""
260 )
261 )
213 self.vcsDiffAct.triggered.connect(self._vcsDiff) 262 self.vcsDiffAct.triggered.connect(self._vcsDiff)
214 self.actions.append(self.vcsDiffAct) 263 self.actions.append(self.vcsDiffAct)
215 264
216 self.gitExtDiffAct = EricAction( 265 self.gitExtDiffAct = EricAction(
217 self.tr('Show differences (extended)'), 266 self.tr("Show differences (extended)"),
218 UI.PixmapCache.getIcon("vcsDiff"), 267 UI.PixmapCache.getIcon("vcsDiff"),
219 self.tr('Show differences (extended) ...'), 268 self.tr("Show differences (extended) ..."),
220 0, 0, self, 'git_extendeddiff') 269 0,
221 self.gitExtDiffAct.setStatusTip(self.tr( 270 0,
222 'Show the difference of revisions of the project to the repository' 271 self,
223 )) 272 "git_extendeddiff",
224 self.gitExtDiffAct.setWhatsThis(self.tr( 273 )
225 """<b>Show differences (extended)</b>""" 274 self.gitExtDiffAct.setStatusTip(
226 """<p>This shows differences of selectable revisions of the""" 275 self.tr("Show the difference of revisions of the project to the repository")
227 """ project.</p>""" 276 )
228 )) 277 self.gitExtDiffAct.setWhatsThis(
278 self.tr(
279 """<b>Show differences (extended)</b>"""
280 """<p>This shows differences of selectable revisions of the"""
281 """ project.</p>"""
282 )
283 )
229 self.gitExtDiffAct.triggered.connect(self.__gitExtendedDiff) 284 self.gitExtDiffAct.triggered.connect(self.__gitExtendedDiff)
230 self.actions.append(self.gitExtDiffAct) 285 self.actions.append(self.gitExtDiffAct)
231 286
232 self.vcsStatusAct = EricAction( 287 self.vcsStatusAct = EricAction(
233 self.tr('Show status'), 288 self.tr("Show status"),
234 UI.PixmapCache.getIcon("vcsStatus"), 289 UI.PixmapCache.getIcon("vcsStatus"),
235 self.tr('Show &status...'), 290 self.tr("Show &status..."),
236 0, 0, self, 'git_status') 291 0,
237 self.vcsStatusAct.setStatusTip(self.tr( 292 0,
238 'Show the status of the local project' 293 self,
239 )) 294 "git_status",
240 self.vcsStatusAct.setWhatsThis(self.tr( 295 )
241 """<b>Show status</b>""" 296 self.vcsStatusAct.setStatusTip(self.tr("Show the status of the local project"))
242 """<p>This shows the status of the local project.</p>""" 297 self.vcsStatusAct.setWhatsThis(
243 )) 298 self.tr(
299 """<b>Show status</b>"""
300 """<p>This shows the status of the local project.</p>"""
301 )
302 )
244 self.vcsStatusAct.triggered.connect(self._vcsStatus) 303 self.vcsStatusAct.triggered.connect(self._vcsStatus)
245 self.actions.append(self.vcsStatusAct) 304 self.actions.append(self.vcsStatusAct)
246 305
247 self.vcsSwitchAct = EricAction( 306 self.vcsSwitchAct = EricAction(
248 self.tr('Switch'), 307 self.tr("Switch"),
249 UI.PixmapCache.getIcon("vcsSwitch"), 308 UI.PixmapCache.getIcon("vcsSwitch"),
250 self.tr('S&witch...'), 309 self.tr("S&witch..."),
251 0, 0, self, 'git_switch') 310 0,
252 self.vcsSwitchAct.setStatusTip(self.tr( 311 0,
253 'Switch the working directory to another revision' 312 self,
254 )) 313 "git_switch",
255 self.vcsSwitchAct.setWhatsThis(self.tr( 314 )
256 """<b>Switch</b>""" 315 self.vcsSwitchAct.setStatusTip(
257 """<p>This switches the working directory to another""" 316 self.tr("Switch the working directory to another revision")
258 """ revision.</p>""" 317 )
259 )) 318 self.vcsSwitchAct.setWhatsThis(
319 self.tr(
320 """<b>Switch</b>"""
321 """<p>This switches the working directory to another"""
322 """ revision.</p>"""
323 )
324 )
260 self.vcsSwitchAct.triggered.connect(self._vcsSwitch) 325 self.vcsSwitchAct.triggered.connect(self._vcsSwitch)
261 self.actions.append(self.vcsSwitchAct) 326 self.actions.append(self.vcsSwitchAct)
262 327
263 self.vcsTagAct = EricAction( 328 self.vcsTagAct = EricAction(
264 self.tr('Tag in repository'), 329 self.tr("Tag in repository"),
265 UI.PixmapCache.getIcon("vcsTag"), 330 UI.PixmapCache.getIcon("vcsTag"),
266 self.tr('&Tag in repository...'), 331 self.tr("&Tag in repository..."),
267 0, 0, self, 'git_tag') 332 0,
268 self.vcsTagAct.setStatusTip(self.tr( 333 0,
269 'Perform tag operations for the local project' 334 self,
270 )) 335 "git_tag",
271 self.vcsTagAct.setWhatsThis(self.tr( 336 )
272 """<b>Tag in repository</b>""" 337 self.vcsTagAct.setStatusTip(
273 """<p>This performs selectable tag operations for the local""" 338 self.tr("Perform tag operations for the local project")
274 """ project.</p>""" 339 )
275 )) 340 self.vcsTagAct.setWhatsThis(
341 self.tr(
342 """<b>Tag in repository</b>"""
343 """<p>This performs selectable tag operations for the local"""
344 """ project.</p>"""
345 )
346 )
276 self.vcsTagAct.triggered.connect(self._vcsTag) 347 self.vcsTagAct.triggered.connect(self._vcsTag)
277 self.actions.append(self.vcsTagAct) 348 self.actions.append(self.vcsTagAct)
278 349
279 self.gitTagListAct = EricAction( 350 self.gitTagListAct = EricAction(
280 self.tr('List tags'), 351 self.tr("List tags"), self.tr("&List tags..."), 0, 0, self, "git_list_tags"
281 self.tr('&List tags...'), 352 )
282 0, 0, self, 'git_list_tags') 353 self.gitTagListAct.setStatusTip(self.tr("List tags of the project"))
283 self.gitTagListAct.setStatusTip(self.tr( 354 self.gitTagListAct.setWhatsThis(
284 'List tags of the project' 355 self.tr(
285 )) 356 """<b>List tags</b>""" """<p>This lists the tags of the project.</p>"""
286 self.gitTagListAct.setWhatsThis(self.tr( 357 )
287 """<b>List tags</b>""" 358 )
288 """<p>This lists the tags of the project.</p>"""
289 ))
290 self.gitTagListAct.triggered.connect(self.__gitTagList) 359 self.gitTagListAct.triggered.connect(self.__gitTagList)
291 self.actions.append(self.gitTagListAct) 360 self.actions.append(self.gitTagListAct)
292 361
293 self.gitDescribeTagAct = EricAction( 362 self.gitDescribeTagAct = EricAction(
294 self.tr('Show most recent tag'), 363 self.tr("Show most recent tag"),
295 self.tr('Show most recent tag'), 364 self.tr("Show most recent tag"),
296 0, 0, self, 'git_describe_tag') 365 0,
297 self.gitDescribeTagAct.setStatusTip(self.tr( 366 0,
298 'Show the most recent tag reachable from the work tree' 367 self,
299 )) 368 "git_describe_tag",
300 self.gitDescribeTagAct.setWhatsThis(self.tr( 369 )
301 """<b>Show most recent tag</b>""" 370 self.gitDescribeTagAct.setStatusTip(
302 """<p>This shows the most recent tag reachable from the work""" 371 self.tr("Show the most recent tag reachable from the work tree")
303 """ tree.</p>""" 372 )
304 )) 373 self.gitDescribeTagAct.setWhatsThis(
374 self.tr(
375 """<b>Show most recent tag</b>"""
376 """<p>This shows the most recent tag reachable from the work"""
377 """ tree.</p>"""
378 )
379 )
305 self.gitDescribeTagAct.triggered.connect(self.__gitDescribeTag) 380 self.gitDescribeTagAct.triggered.connect(self.__gitDescribeTag)
306 self.actions.append(self.gitDescribeTagAct) 381 self.actions.append(self.gitDescribeTagAct)
307 382
308 self.gitBranchListAct = EricAction( 383 self.gitBranchListAct = EricAction(
309 self.tr('List branches'), 384 self.tr("List branches"),
310 self.tr('&List branches...'), 385 self.tr("&List branches..."),
311 0, 0, self, 'git_list_branches') 386 0,
312 self.gitBranchListAct.setStatusTip(self.tr( 387 0,
313 'List branches of the project' 388 self,
314 )) 389 "git_list_branches",
315 self.gitBranchListAct.setWhatsThis(self.tr( 390 )
316 """<b>List branches</b>""" 391 self.gitBranchListAct.setStatusTip(self.tr("List branches of the project"))
317 """<p>This lists the branches of the project.</p>""" 392 self.gitBranchListAct.setWhatsThis(
318 )) 393 self.tr(
394 """<b>List branches</b>"""
395 """<p>This lists the branches of the project.</p>"""
396 )
397 )
319 self.gitBranchListAct.triggered.connect(self.__gitBranchList) 398 self.gitBranchListAct.triggered.connect(self.__gitBranchList)
320 self.actions.append(self.gitBranchListAct) 399 self.actions.append(self.gitBranchListAct)
321 400
322 self.gitMergedBranchListAct = EricAction( 401 self.gitMergedBranchListAct = EricAction(
323 self.tr('List merged branches'), 402 self.tr("List merged branches"),
324 self.tr('List &merged branches...'), 403 self.tr("List &merged branches..."),
325 0, 0, self, 'git_list_merged_branches') 404 0,
326 self.gitMergedBranchListAct.setStatusTip(self.tr( 405 0,
327 'List merged branches of the project' 406 self,
328 )) 407 "git_list_merged_branches",
329 self.gitMergedBranchListAct.setWhatsThis(self.tr( 408 )
330 """<b>List merged branches</b>""" 409 self.gitMergedBranchListAct.setStatusTip(
331 """<p>This lists the merged branches of the project.</p>""" 410 self.tr("List merged branches of the project")
332 )) 411 )
333 self.gitMergedBranchListAct.triggered.connect( 412 self.gitMergedBranchListAct.setWhatsThis(
334 self.__gitMergedBranchList) 413 self.tr(
414 """<b>List merged branches</b>"""
415 """<p>This lists the merged branches of the project.</p>"""
416 )
417 )
418 self.gitMergedBranchListAct.triggered.connect(self.__gitMergedBranchList)
335 self.actions.append(self.gitMergedBranchListAct) 419 self.actions.append(self.gitMergedBranchListAct)
336 420
337 self.gitNotMergedBranchListAct = EricAction( 421 self.gitNotMergedBranchListAct = EricAction(
338 self.tr('List non-merged branches'), 422 self.tr("List non-merged branches"),
339 self.tr('List &non-merged branches...'), 423 self.tr("List &non-merged branches..."),
340 0, 0, self, 'git_list_non_merged_branches') 424 0,
341 self.gitNotMergedBranchListAct.setStatusTip(self.tr( 425 0,
342 'List non-merged branches of the project' 426 self,
343 )) 427 "git_list_non_merged_branches",
344 self.gitNotMergedBranchListAct.setWhatsThis(self.tr( 428 )
345 """<b>List non-merged branches</b>""" 429 self.gitNotMergedBranchListAct.setStatusTip(
346 """<p>This lists the non-merged branches of the project.</p>""" 430 self.tr("List non-merged branches of the project")
347 )) 431 )
348 self.gitNotMergedBranchListAct.triggered.connect( 432 self.gitNotMergedBranchListAct.setWhatsThis(
349 self.__gitNotMergedBranchList) 433 self.tr(
434 """<b>List non-merged branches</b>"""
435 """<p>This lists the non-merged branches of the project.</p>"""
436 )
437 )
438 self.gitNotMergedBranchListAct.triggered.connect(self.__gitNotMergedBranchList)
350 self.actions.append(self.gitNotMergedBranchListAct) 439 self.actions.append(self.gitNotMergedBranchListAct)
351 440
352 self.gitBranchAct = EricAction( 441 self.gitBranchAct = EricAction(
353 self.tr('Branch in repository'), 442 self.tr("Branch in repository"),
354 UI.PixmapCache.getIcon("vcsBranch"), 443 UI.PixmapCache.getIcon("vcsBranch"),
355 self.tr('&Branch in repository...'), 444 self.tr("&Branch in repository..."),
356 0, 0, self, 'git_branch') 445 0,
357 self.gitBranchAct.setStatusTip(self.tr( 446 0,
358 'Perform branch operations for the local project' 447 self,
359 )) 448 "git_branch",
360 self.gitBranchAct.setWhatsThis(self.tr( 449 )
361 """<b>Branch in repository</b>""" 450 self.gitBranchAct.setStatusTip(
362 """<p>This performs selectable branch operations for the local""" 451 self.tr("Perform branch operations for the local project")
363 """ project.</p>""" 452 )
364 )) 453 self.gitBranchAct.setWhatsThis(
454 self.tr(
455 """<b>Branch in repository</b>"""
456 """<p>This performs selectable branch operations for the local"""
457 """ project.</p>"""
458 )
459 )
365 self.gitBranchAct.triggered.connect(self.__gitBranch) 460 self.gitBranchAct.triggered.connect(self.__gitBranch)
366 self.actions.append(self.gitBranchAct) 461 self.actions.append(self.gitBranchAct)
367 462
368 self.gitDeleteRemoteBranchAct = EricAction( 463 self.gitDeleteRemoteBranchAct = EricAction(
369 self.tr('Delete Remote Branch'), 464 self.tr("Delete Remote Branch"),
370 self.tr('&Delete Remote Branch...'), 465 self.tr("&Delete Remote Branch..."),
371 0, 0, self, 'git_delete_remote_branch') 466 0,
372 self.gitDeleteRemoteBranchAct.setStatusTip(self.tr( 467 0,
373 'Delete a branch from a remote repository' 468 self,
374 )) 469 "git_delete_remote_branch",
375 self.gitDeleteRemoteBranchAct.setWhatsThis(self.tr( 470 )
376 """<b>Delete Remote Branch</b>""" 471 self.gitDeleteRemoteBranchAct.setStatusTip(
377 """<p>This deletes a branch from a remote repository.</p>""" 472 self.tr("Delete a branch from a remote repository")
378 )) 473 )
474 self.gitDeleteRemoteBranchAct.setWhatsThis(
475 self.tr(
476 """<b>Delete Remote Branch</b>"""
477 """<p>This deletes a branch from a remote repository.</p>"""
478 )
479 )
379 self.gitDeleteRemoteBranchAct.triggered.connect(self.__gitDeleteBranch) 480 self.gitDeleteRemoteBranchAct.triggered.connect(self.__gitDeleteBranch)
380 self.actions.append(self.gitDeleteRemoteBranchAct) 481 self.actions.append(self.gitDeleteRemoteBranchAct)
381 482
382 self.gitShowBranchAct = EricAction( 483 self.gitShowBranchAct = EricAction(
383 self.tr('Show current branch'), 484 self.tr("Show current branch"),
384 self.tr('Show current branch'), 485 self.tr("Show current branch"),
385 0, 0, self, 'git_show_branch') 486 0,
386 self.gitShowBranchAct.setStatusTip(self.tr( 487 0,
387 'Show the current branch of the project' 488 self,
388 )) 489 "git_show_branch",
389 self.gitShowBranchAct.setWhatsThis(self.tr( 490 )
390 """<b>Show current branch</b>""" 491 self.gitShowBranchAct.setStatusTip(
391 """<p>This shows the current branch of the project.</p>""" 492 self.tr("Show the current branch of the project")
392 )) 493 )
494 self.gitShowBranchAct.setWhatsThis(
495 self.tr(
496 """<b>Show current branch</b>"""
497 """<p>This shows the current branch of the project.</p>"""
498 )
499 )
393 self.gitShowBranchAct.triggered.connect(self.__gitShowBranch) 500 self.gitShowBranchAct.triggered.connect(self.__gitShowBranch)
394 self.actions.append(self.gitShowBranchAct) 501 self.actions.append(self.gitShowBranchAct)
395 502
396 self.vcsRevertAct = EricAction( 503 self.vcsRevertAct = EricAction(
397 self.tr('Revert changes'), 504 self.tr("Revert changes"),
398 UI.PixmapCache.getIcon("vcsRevert"), 505 UI.PixmapCache.getIcon("vcsRevert"),
399 self.tr('Re&vert changes'), 506 self.tr("Re&vert changes"),
400 0, 0, self, 'git_revert') 507 0,
401 self.vcsRevertAct.setStatusTip(self.tr( 508 0,
402 'Revert all changes made to the local project' 509 self,
403 )) 510 "git_revert",
404 self.vcsRevertAct.setWhatsThis(self.tr( 511 )
405 """<b>Revert changes</b>""" 512 self.vcsRevertAct.setStatusTip(
406 """<p>This reverts all changes made to the local project.</p>""" 513 self.tr("Revert all changes made to the local project")
407 )) 514 )
515 self.vcsRevertAct.setWhatsThis(
516 self.tr(
517 """<b>Revert changes</b>"""
518 """<p>This reverts all changes made to the local project.</p>"""
519 )
520 )
408 self.vcsRevertAct.triggered.connect(self.__gitRevert) 521 self.vcsRevertAct.triggered.connect(self.__gitRevert)
409 self.actions.append(self.vcsRevertAct) 522 self.actions.append(self.vcsRevertAct)
410 523
411 self.gitUnstageAct = EricAction( 524 self.gitUnstageAct = EricAction(
412 self.tr('Unstage changes'), 525 self.tr("Unstage changes"),
413 UI.PixmapCache.getIcon("vcsRevert"), 526 UI.PixmapCache.getIcon("vcsRevert"),
414 self.tr('&Unstage changes'), 527 self.tr("&Unstage changes"),
415 0, 0, self, 'git_revert') 528 0,
416 self.gitUnstageAct.setStatusTip(self.tr( 529 0,
417 'Unstage all changes made to the local project' 530 self,
418 )) 531 "git_revert",
419 self.gitUnstageAct.setWhatsThis(self.tr( 532 )
420 """<b>Unstage changes</b>""" 533 self.gitUnstageAct.setStatusTip(
421 """<p>This unstages all changes made to the local project.</p>""" 534 self.tr("Unstage all changes made to the local project")
422 )) 535 )
536 self.gitUnstageAct.setWhatsThis(
537 self.tr(
538 """<b>Unstage changes</b>"""
539 """<p>This unstages all changes made to the local project.</p>"""
540 )
541 )
423 self.gitUnstageAct.triggered.connect(self.__gitUnstage) 542 self.gitUnstageAct.triggered.connect(self.__gitUnstage)
424 self.actions.append(self.gitUnstageAct) 543 self.actions.append(self.gitUnstageAct)
425 544
426 self.vcsMergeAct = EricAction( 545 self.vcsMergeAct = EricAction(
427 self.tr('Merge'), 546 self.tr("Merge"),
428 UI.PixmapCache.getIcon("vcsMerge"), 547 UI.PixmapCache.getIcon("vcsMerge"),
429 self.tr('Mer&ge changes...'), 548 self.tr("Mer&ge changes..."),
430 0, 0, self, 'git_merge') 549 0,
431 self.vcsMergeAct.setStatusTip(self.tr( 550 0,
432 'Merge changes into the local project' 551 self,
433 )) 552 "git_merge",
434 self.vcsMergeAct.setWhatsThis(self.tr( 553 )
435 """<b>Merge</b>""" 554 self.vcsMergeAct.setStatusTip(self.tr("Merge changes into the local project"))
436 """<p>This merges changes into the local project.</p>""" 555 self.vcsMergeAct.setWhatsThis(
437 )) 556 self.tr(
557 """<b>Merge</b>"""
558 """<p>This merges changes into the local project.</p>"""
559 )
560 )
438 self.vcsMergeAct.triggered.connect(self._vcsMerge) 561 self.vcsMergeAct.triggered.connect(self._vcsMerge)
439 self.actions.append(self.vcsMergeAct) 562 self.actions.append(self.vcsMergeAct)
440 563
441 self.gitCancelMergeAct = EricAction( 564 self.gitCancelMergeAct = EricAction(
442 self.tr('Cancel uncommitted/failed merge'), 565 self.tr("Cancel uncommitted/failed merge"),
443 self.tr('Cancel uncommitted/failed merge'), 566 self.tr("Cancel uncommitted/failed merge"),
444 0, 0, self, 'git_cancel_merge') 567 0,
445 self.gitCancelMergeAct.setStatusTip(self.tr( 568 0,
446 'Cancel an uncommitted or failed merge and lose all changes' 569 self,
447 )) 570 "git_cancel_merge",
448 self.gitCancelMergeAct.setWhatsThis(self.tr( 571 )
449 """<b>Cancel uncommitted/failed merge</b>""" 572 self.gitCancelMergeAct.setStatusTip(
450 """<p>This cancels an uncommitted or failed merge causing all""" 573 self.tr("Cancel an uncommitted or failed merge and lose all changes")
451 """ changes to be lost.</p>""" 574 )
452 )) 575 self.gitCancelMergeAct.setWhatsThis(
576 self.tr(
577 """<b>Cancel uncommitted/failed merge</b>"""
578 """<p>This cancels an uncommitted or failed merge causing all"""
579 """ changes to be lost.</p>"""
580 )
581 )
453 self.gitCancelMergeAct.triggered.connect(self.__gitCancelMerge) 582 self.gitCancelMergeAct.triggered.connect(self.__gitCancelMerge)
454 self.actions.append(self.gitCancelMergeAct) 583 self.actions.append(self.gitCancelMergeAct)
455 584
456 self.gitCommitMergeAct = EricAction( 585 self.gitCommitMergeAct = EricAction(
457 self.tr('Commit failed merge'), 586 self.tr("Commit failed merge"),
458 self.tr('Commit failed merge'), 587 self.tr("Commit failed merge"),
459 0, 0, self, 'git_commit_merge') 588 0,
460 self.gitCommitMergeAct.setStatusTip(self.tr( 589 0,
461 'Commit a failed merge after conflicts have been resolved' 590 self,
462 )) 591 "git_commit_merge",
463 self.gitCommitMergeAct.setWhatsThis(self.tr( 592 )
464 """<b>Commit failed merge</b>""" 593 self.gitCommitMergeAct.setStatusTip(
465 """<p>This commits a failed merge after conflicts have been""" 594 self.tr("Commit a failed merge after conflicts have been resolved")
466 """ resolved.</p>""" 595 )
467 )) 596 self.gitCommitMergeAct.setWhatsThis(
597 self.tr(
598 """<b>Commit failed merge</b>"""
599 """<p>This commits a failed merge after conflicts have been"""
600 """ resolved.</p>"""
601 )
602 )
468 self.gitCommitMergeAct.triggered.connect(self.__gitCommitMerge) 603 self.gitCommitMergeAct.triggered.connect(self.__gitCommitMerge)
469 self.actions.append(self.gitCommitMergeAct) 604 self.actions.append(self.gitCommitMergeAct)
470 605
471 self.vcsCleanupAct = EricAction( 606 self.vcsCleanupAct = EricAction(
472 self.tr('Cleanup'), 607 self.tr("Cleanup"), self.tr("Cleanu&p"), 0, 0, self, "git_cleanup"
473 self.tr('Cleanu&p'), 608 )
474 0, 0, self, 'git_cleanup') 609 self.vcsCleanupAct.setStatusTip(self.tr("Cleanup the local project"))
475 self.vcsCleanupAct.setStatusTip(self.tr( 610 self.vcsCleanupAct.setWhatsThis(
476 'Cleanup the local project' 611 self.tr(
477 )) 612 """<b>Cleanup</b>"""
478 self.vcsCleanupAct.setWhatsThis(self.tr( 613 """<p>This performs a cleanup of the local project.</p>"""
479 """<b>Cleanup</b>""" 614 )
480 """<p>This performs a cleanup of the local project.</p>""" 615 )
481 ))
482 self.vcsCleanupAct.triggered.connect(self._vcsCleanup) 616 self.vcsCleanupAct.triggered.connect(self._vcsCleanup)
483 self.actions.append(self.vcsCleanupAct) 617 self.actions.append(self.vcsCleanupAct)
484 618
485 self.vcsCommandAct = EricAction( 619 self.vcsCommandAct = EricAction(
486 self.tr('Execute command'), 620 self.tr("Execute command"),
487 self.tr('E&xecute command...'), 621 self.tr("E&xecute command..."),
488 0, 0, self, 'git_command') 622 0,
489 self.vcsCommandAct.setStatusTip(self.tr( 623 0,
490 'Execute an arbitrary Git command' 624 self,
491 )) 625 "git_command",
492 self.vcsCommandAct.setWhatsThis(self.tr( 626 )
493 """<b>Execute command</b>""" 627 self.vcsCommandAct.setStatusTip(self.tr("Execute an arbitrary Git command"))
494 """<p>This opens a dialog to enter an arbitrary Git""" 628 self.vcsCommandAct.setWhatsThis(
495 """ command.</p>""" 629 self.tr(
496 )) 630 """<b>Execute command</b>"""
631 """<p>This opens a dialog to enter an arbitrary Git"""
632 """ command.</p>"""
633 )
634 )
497 self.vcsCommandAct.triggered.connect(self._vcsCommand) 635 self.vcsCommandAct.triggered.connect(self._vcsCommand)
498 self.actions.append(self.vcsCommandAct) 636 self.actions.append(self.vcsCommandAct)
499 637
500 self.gitConfigAct = EricAction( 638 self.gitConfigAct = EricAction(
501 self.tr('Configure'), 639 self.tr("Configure"), self.tr("Configure..."), 0, 0, self, "git_configure"
502 self.tr('Configure...'), 640 )
503 0, 0, self, 'git_configure') 641 self.gitConfigAct.setStatusTip(
504 self.gitConfigAct.setStatusTip(self.tr( 642 self.tr("Show the configuration dialog with the Git page selected")
505 'Show the configuration dialog with the Git page selected' 643 )
506 )) 644 self.gitConfigAct.setWhatsThis(
507 self.gitConfigAct.setWhatsThis(self.tr( 645 self.tr(
508 """<b>Configure</b>""" 646 """<b>Configure</b>"""
509 """<p>Show the configuration dialog with the Git page""" 647 """<p>Show the configuration dialog with the Git page"""
510 """ selected.</p>""" 648 """ selected.</p>"""
511 )) 649 )
650 )
512 self.gitConfigAct.triggered.connect(self.__gitConfigure) 651 self.gitConfigAct.triggered.connect(self.__gitConfigure)
513 self.actions.append(self.gitConfigAct) 652 self.actions.append(self.gitConfigAct)
514 653
515 self.gitRemotesShowAct = EricAction( 654 self.gitRemotesShowAct = EricAction(
516 self.tr('Show Remotes'), 655 self.tr("Show Remotes"),
517 self.tr('Show Remotes...'), 656 self.tr("Show Remotes..."),
518 0, 0, self, 'git_show_remotes') 657 0,
519 self.gitRemotesShowAct.setStatusTip(self.tr( 658 0,
520 'Show the available remote repositories' 659 self,
521 )) 660 "git_show_remotes",
522 self.gitRemotesShowAct.setWhatsThis(self.tr( 661 )
523 """<b>Show Remotes</b>""" 662 self.gitRemotesShowAct.setStatusTip(
524 """<p>This shows the remote repositories available for""" 663 self.tr("Show the available remote repositories")
525 """ pulling, fetching and pushing.</p>""" 664 )
526 )) 665 self.gitRemotesShowAct.setWhatsThis(
666 self.tr(
667 """<b>Show Remotes</b>"""
668 """<p>This shows the remote repositories available for"""
669 """ pulling, fetching and pushing.</p>"""
670 )
671 )
527 self.gitRemotesShowAct.triggered.connect(self.__gitShowRemotes) 672 self.gitRemotesShowAct.triggered.connect(self.__gitShowRemotes)
528 self.actions.append(self.gitRemotesShowAct) 673 self.actions.append(self.gitRemotesShowAct)
529 674
530 self.gitRemoteShowAct = EricAction( 675 self.gitRemoteShowAct = EricAction(
531 self.tr('Show Remote Info'), 676 self.tr("Show Remote Info"),
532 self.tr('Show Remote Info...'), 677 self.tr("Show Remote Info..."),
533 0, 0, self, 'git_show_remote_info') 678 0,
534 self.gitRemoteShowAct.setStatusTip(self.tr( 679 0,
535 'Show information about a remote repository' 680 self,
536 )) 681 "git_show_remote_info",
537 self.gitRemoteShowAct.setWhatsThis(self.tr( 682 )
538 """<b>Show Remotes</b>""" 683 self.gitRemoteShowAct.setStatusTip(
539 """<p>This shows the remote repositories available for""" 684 self.tr("Show information about a remote repository")
540 """ pulling, fetching and pushing.</p>""" 685 )
541 )) 686 self.gitRemoteShowAct.setWhatsThis(
687 self.tr(
688 """<b>Show Remotes</b>"""
689 """<p>This shows the remote repositories available for"""
690 """ pulling, fetching and pushing.</p>"""
691 )
692 )
542 self.gitRemoteShowAct.triggered.connect(self.__gitShowRemote) 693 self.gitRemoteShowAct.triggered.connect(self.__gitShowRemote)
543 self.actions.append(self.gitRemoteShowAct) 694 self.actions.append(self.gitRemoteShowAct)
544 695
545 self.gitRemoteAddAct = EricAction( 696 self.gitRemoteAddAct = EricAction(
546 self.tr('Add'), 697 self.tr("Add"), self.tr("Add..."), 0, 0, self, "git_add_remote"
547 self.tr('Add...'), 698 )
548 0, 0, self, 'git_add_remote') 699 self.gitRemoteAddAct.setStatusTip(self.tr("Add a remote repository"))
549 self.gitRemoteAddAct.setStatusTip(self.tr( 700 self.gitRemoteAddAct.setWhatsThis(
550 'Add a remote repository' 701 self.tr("""<b>Add</b>""" """<p>This adds a remote repository.</p>""")
551 )) 702 )
552 self.gitRemoteAddAct.setWhatsThis(self.tr(
553 """<b>Add</b>"""
554 """<p>This adds a remote repository.</p>"""
555 ))
556 self.gitRemoteAddAct.triggered.connect(self.__gitAddRemote) 703 self.gitRemoteAddAct.triggered.connect(self.__gitAddRemote)
557 self.actions.append(self.gitRemoteAddAct) 704 self.actions.append(self.gitRemoteAddAct)
558 705
559 self.gitRemoteRemoveAct = EricAction( 706 self.gitRemoteRemoveAct = EricAction(
560 self.tr('Remove'), 707 self.tr("Remove"), self.tr("Remove..."), 0, 0, self, "git_remove_remote"
561 self.tr('Remove...'), 708 )
562 0, 0, self, 'git_remove_remote') 709 self.gitRemoteRemoveAct.setStatusTip(self.tr("Remove a remote repository"))
563 self.gitRemoteRemoveAct.setStatusTip(self.tr( 710 self.gitRemoteRemoveAct.setWhatsThis(
564 'Remove a remote repository' 711 self.tr("""<b>Remove</b>""" """<p>This removes a remote repository.</p>""")
565 )) 712 )
566 self.gitRemoteRemoveAct.setWhatsThis(self.tr(
567 """<b>Remove</b>"""
568 """<p>This removes a remote repository.</p>"""
569 ))
570 self.gitRemoteRemoveAct.triggered.connect(self.__gitRemoveRemote) 713 self.gitRemoteRemoveAct.triggered.connect(self.__gitRemoveRemote)
571 self.actions.append(self.gitRemoteRemoveAct) 714 self.actions.append(self.gitRemoteRemoveAct)
572 715
573 self.gitRemotePruneAct = EricAction( 716 self.gitRemotePruneAct = EricAction(
574 self.tr('Prune'), 717 self.tr("Prune"), self.tr("Prune..."), 0, 0, self, "git_prune_remote"
575 self.tr('Prune...'), 718 )
576 0, 0, self, 'git_prune_remote') 719 self.gitRemotePruneAct.setStatusTip(
577 self.gitRemotePruneAct.setStatusTip(self.tr( 720 self.tr("Prune stale remote-tracking branches of a remote repository")
578 'Prune stale remote-tracking branches of a remote repository' 721 )
579 )) 722 self.gitRemotePruneAct.setWhatsThis(
580 self.gitRemotePruneAct.setWhatsThis(self.tr( 723 self.tr(
581 """<b>Prune</b>""" 724 """<b>Prune</b>"""
582 """<p>This prunes stale remote-tracking branches of a remote""" 725 """<p>This prunes stale remote-tracking branches of a remote"""
583 """ repository.</p>""" 726 """ repository.</p>"""
584 )) 727 )
728 )
585 self.gitRemotePruneAct.triggered.connect(self.__gitPruneRemote) 729 self.gitRemotePruneAct.triggered.connect(self.__gitPruneRemote)
586 self.actions.append(self.gitRemotePruneAct) 730 self.actions.append(self.gitRemotePruneAct)
587 731
588 self.gitRemoteRenameAct = EricAction( 732 self.gitRemoteRenameAct = EricAction(
589 self.tr('Rename'), 733 self.tr("Rename"), self.tr("Rename..."), 0, 0, self, "git_rename_remote"
590 self.tr('Rename...'), 734 )
591 0, 0, self, 'git_rename_remote') 735 self.gitRemoteRenameAct.setStatusTip(self.tr("Rename a remote repository"))
592 self.gitRemoteRenameAct.setStatusTip(self.tr( 736 self.gitRemoteRenameAct.setWhatsThis(
593 'Rename a remote repository' 737 self.tr("""<b>Rename</b>""" """<p>This renames a remote repository.</p>""")
594 )) 738 )
595 self.gitRemoteRenameAct.setWhatsThis(self.tr(
596 """<b>Rename</b>"""
597 """<p>This renames a remote repository.</p>"""
598 ))
599 self.gitRemoteRenameAct.triggered.connect(self.__gitRenameRemote) 739 self.gitRemoteRenameAct.triggered.connect(self.__gitRenameRemote)
600 self.actions.append(self.gitRemoteRenameAct) 740 self.actions.append(self.gitRemoteRenameAct)
601 741
602 self.gitRemoteChangeUrlAct = EricAction( 742 self.gitRemoteChangeUrlAct = EricAction(
603 self.tr('Change URL'), 743 self.tr("Change URL"),
604 self.tr('Change URL...'), 744 self.tr("Change URL..."),
605 0, 0, self, 'git_change_remote_url') 745 0,
606 self.gitRemoteChangeUrlAct.setStatusTip(self.tr( 746 0,
607 'Change the URL of a remote repository' 747 self,
608 )) 748 "git_change_remote_url",
609 self.gitRemoteChangeUrlAct.setWhatsThis(self.tr( 749 )
610 """<b>Change URL</b>""" 750 self.gitRemoteChangeUrlAct.setStatusTip(
611 """<p>This changes the URL of a remote repository.</p>""" 751 self.tr("Change the URL of a remote repository")
612 )) 752 )
753 self.gitRemoteChangeUrlAct.setWhatsThis(
754 self.tr(
755 """<b>Change URL</b>"""
756 """<p>This changes the URL of a remote repository.</p>"""
757 )
758 )
613 self.gitRemoteChangeUrlAct.triggered.connect(self.__gitChangeRemoteUrl) 759 self.gitRemoteChangeUrlAct.triggered.connect(self.__gitChangeRemoteUrl)
614 self.actions.append(self.gitRemoteChangeUrlAct) 760 self.actions.append(self.gitRemoteChangeUrlAct)
615 761
616 self.gitRemoteCredentialsAct = EricAction( 762 self.gitRemoteCredentialsAct = EricAction(
617 self.tr('Credentials'), 763 self.tr("Credentials"),
618 self.tr('Credentials...'), 764 self.tr("Credentials..."),
619 0, 0, self, 'git_remote_credentials') 765 0,
620 self.gitRemoteCredentialsAct.setStatusTip(self.tr( 766 0,
621 'Change or set the user credentials of a remote repository' 767 self,
622 )) 768 "git_remote_credentials",
623 self.gitRemoteCredentialsAct.setWhatsThis(self.tr( 769 )
624 """<b>Credentials</b>""" 770 self.gitRemoteCredentialsAct.setStatusTip(
625 """<p>This changes or sets the user credentials of a""" 771 self.tr("Change or set the user credentials of a remote repository")
626 """ remote repository.</p>""" 772 )
627 )) 773 self.gitRemoteCredentialsAct.setWhatsThis(
628 self.gitRemoteCredentialsAct.triggered.connect( 774 self.tr(
629 self.__gitRemoteCredentials) 775 """<b>Credentials</b>"""
776 """<p>This changes or sets the user credentials of a"""
777 """ remote repository.</p>"""
778 )
779 )
780 self.gitRemoteCredentialsAct.triggered.connect(self.__gitRemoteCredentials)
630 self.actions.append(self.gitRemoteCredentialsAct) 781 self.actions.append(self.gitRemoteCredentialsAct)
631 782
632 self.gitCherryPickAct = EricAction( 783 self.gitCherryPickAct = EricAction(
633 self.tr('Copy Commits'), 784 self.tr("Copy Commits"),
634 UI.PixmapCache.getIcon("vcsGraft"), 785 UI.PixmapCache.getIcon("vcsGraft"),
635 self.tr('Copy Commits'), 786 self.tr("Copy Commits"),
636 0, 0, self, 'git_cherrypick') 787 0,
637 self.gitCherryPickAct.setStatusTip(self.tr( 788 0,
638 'Copies commits into the current branch' 789 self,
639 )) 790 "git_cherrypick",
640 self.gitCherryPickAct.setWhatsThis(self.tr( 791 )
641 """<b>Copy Commits</b>""" 792 self.gitCherryPickAct.setStatusTip(
642 """<p>This copies commits on top of the current branch.</p>""" 793 self.tr("Copies commits into the current branch")
643 )) 794 )
795 self.gitCherryPickAct.setWhatsThis(
796 self.tr(
797 """<b>Copy Commits</b>"""
798 """<p>This copies commits on top of the current branch.</p>"""
799 )
800 )
644 self.gitCherryPickAct.triggered.connect(self.__gitCherryPick) 801 self.gitCherryPickAct.triggered.connect(self.__gitCherryPick)
645 self.actions.append(self.gitCherryPickAct) 802 self.actions.append(self.gitCherryPickAct)
646 803
647 self.gitCherryPickContinueAct = EricAction( 804 self.gitCherryPickContinueAct = EricAction(
648 self.tr('Continue Copying Session'), 805 self.tr("Continue Copying Session"),
649 self.tr('Continue Copying Session'), 806 self.tr("Continue Copying Session"),
650 0, 0, self, 'git_cherrypick_continue') 807 0,
651 self.gitCherryPickContinueAct.setStatusTip(self.tr( 808 0,
652 'Continue the last copying session after conflicts were resolved' 809 self,
653 )) 810 "git_cherrypick_continue",
654 self.gitCherryPickContinueAct.setWhatsThis(self.tr( 811 )
655 """<b>Continue Copying Session</b>""" 812 self.gitCherryPickContinueAct.setStatusTip(
656 """<p>This continues the last copying session after conflicts""" 813 self.tr("Continue the last copying session after conflicts were resolved")
657 """ were resolved.</p>""" 814 )
658 )) 815 self.gitCherryPickContinueAct.setWhatsThis(
659 self.gitCherryPickContinueAct.triggered.connect( 816 self.tr(
660 self.__gitCherryPickContinue) 817 """<b>Continue Copying Session</b>"""
818 """<p>This continues the last copying session after conflicts"""
819 """ were resolved.</p>"""
820 )
821 )
822 self.gitCherryPickContinueAct.triggered.connect(self.__gitCherryPickContinue)
661 self.actions.append(self.gitCherryPickContinueAct) 823 self.actions.append(self.gitCherryPickContinueAct)
662 824
663 self.gitCherryPickQuitAct = EricAction( 825 self.gitCherryPickQuitAct = EricAction(
664 self.tr('Quit Copying Session'), 826 self.tr("Quit Copying Session"),
665 self.tr('Quit Copying Session'), 827 self.tr("Quit Copying Session"),
666 0, 0, self, 'git_cherrypick_quit') 828 0,
667 self.gitCherryPickQuitAct.setStatusTip(self.tr( 829 0,
668 'Quit the current copying session' 830 self,
669 )) 831 "git_cherrypick_quit",
670 self.gitCherryPickQuitAct.setWhatsThis(self.tr( 832 )
671 """<b>Quit Copying Session</b>""" 833 self.gitCherryPickQuitAct.setStatusTip(
672 """<p>This quits the current copying session.</p>""" 834 self.tr("Quit the current copying session")
673 )) 835 )
836 self.gitCherryPickQuitAct.setWhatsThis(
837 self.tr(
838 """<b>Quit Copying Session</b>"""
839 """<p>This quits the current copying session.</p>"""
840 )
841 )
674 self.gitCherryPickQuitAct.triggered.connect(self.__gitCherryPickQuit) 842 self.gitCherryPickQuitAct.triggered.connect(self.__gitCherryPickQuit)
675 self.actions.append(self.gitCherryPickQuitAct) 843 self.actions.append(self.gitCherryPickQuitAct)
676 844
677 self.gitCherryPickAbortAct = EricAction( 845 self.gitCherryPickAbortAct = EricAction(
678 self.tr('Cancel Copying Session'), 846 self.tr("Cancel Copying Session"),
679 self.tr('Cancel Copying Session'), 847 self.tr("Cancel Copying Session"),
680 0, 0, self, 'git_cherrypick_abort') 848 0,
681 self.gitCherryPickAbortAct.setStatusTip(self.tr( 849 0,
682 'Cancel the current copying session and return to the' 850 self,
683 ' previous state' 851 "git_cherrypick_abort",
684 )) 852 )
685 self.gitCherryPickAbortAct.setWhatsThis(self.tr( 853 self.gitCherryPickAbortAct.setStatusTip(
686 """<b>Cancel Copying Session</b>""" 854 self.tr(
687 """<p>This cancels the current copying session and returns to""" 855 "Cancel the current copying session and return to the" " previous state"
688 """ the previous state.</p>""" 856 )
689 )) 857 )
858 self.gitCherryPickAbortAct.setWhatsThis(
859 self.tr(
860 """<b>Cancel Copying Session</b>"""
861 """<p>This cancels the current copying session and returns to"""
862 """ the previous state.</p>"""
863 )
864 )
690 self.gitCherryPickAbortAct.triggered.connect(self.__gitCherryPickAbort) 865 self.gitCherryPickAbortAct.triggered.connect(self.__gitCherryPickAbort)
691 self.actions.append(self.gitCherryPickAbortAct) 866 self.actions.append(self.gitCherryPickAbortAct)
692 867
693 self.gitStashAct = EricAction( 868 self.gitStashAct = EricAction(
694 self.tr('Stash changes'), 869 self.tr("Stash changes"),
695 self.tr('Stash changes...'), 870 self.tr("Stash changes..."),
696 0, 0, self, 'git_stash') 871 0,
697 self.gitStashAct.setStatusTip(self.tr( 872 0,
698 'Stash all current changes of the project' 873 self,
699 )) 874 "git_stash",
700 self.gitStashAct.setWhatsThis(self.tr( 875 )
701 """<b>Stash changes</b>""" 876 self.gitStashAct.setStatusTip(
702 """<p>This stashes all current changes of the project.</p>""" 877 self.tr("Stash all current changes of the project")
703 )) 878 )
879 self.gitStashAct.setWhatsThis(
880 self.tr(
881 """<b>Stash changes</b>"""
882 """<p>This stashes all current changes of the project.</p>"""
883 )
884 )
704 self.gitStashAct.triggered.connect(self.__gitStashSave) 885 self.gitStashAct.triggered.connect(self.__gitStashSave)
705 self.actions.append(self.gitStashAct) 886 self.actions.append(self.gitStashAct)
706 887
707 self.gitStashBrowserAct = EricAction( 888 self.gitStashBrowserAct = EricAction(
708 self.tr('Show stash browser'), 889 self.tr("Show stash browser"),
709 self.tr('Show stash browser...'), 890 self.tr("Show stash browser..."),
710 0, 0, self, 'git_stash_browser') 891 0,
711 self.gitStashBrowserAct.setStatusTip(self.tr( 892 0,
712 'Show a dialog with all stashes' 893 self,
713 )) 894 "git_stash_browser",
714 self.gitStashBrowserAct.setWhatsThis(self.tr( 895 )
715 """<b>Show stash browser...</b>""" 896 self.gitStashBrowserAct.setStatusTip(self.tr("Show a dialog with all stashes"))
716 """<p>This shows a dialog listing all available stashes.""" 897 self.gitStashBrowserAct.setWhatsThis(
717 """ Actions on these stashes may be executed via the""" 898 self.tr(
718 """ context menu.</p>""" 899 """<b>Show stash browser...</b>"""
719 )) 900 """<p>This shows a dialog listing all available stashes."""
901 """ Actions on these stashes may be executed via the"""
902 """ context menu.</p>"""
903 )
904 )
720 self.gitStashBrowserAct.triggered.connect(self.__gitStashBrowser) 905 self.gitStashBrowserAct.triggered.connect(self.__gitStashBrowser)
721 self.actions.append(self.gitStashBrowserAct) 906 self.actions.append(self.gitStashBrowserAct)
722 907
723 self.gitStashShowAct = EricAction( 908 self.gitStashShowAct = EricAction(
724 self.tr('Show stash'), 909 self.tr("Show stash"),
725 self.tr('Show stash...'), 910 self.tr("Show stash..."),
726 0, 0, self, 'git_stash_show') 911 0,
727 self.gitStashShowAct.setStatusTip(self.tr( 912 0,
728 'Show a dialog with a patch of a stash' 913 self,
729 )) 914 "git_stash_show",
730 self.gitStashShowAct.setWhatsThis(self.tr( 915 )
731 """<b>Show stash...</b>""" 916 self.gitStashShowAct.setStatusTip(
732 """<p>This shows a dialog with a patch of a selectable""" 917 self.tr("Show a dialog with a patch of a stash")
733 """ stash.</p>""" 918 )
734 )) 919 self.gitStashShowAct.setWhatsThis(
920 self.tr(
921 """<b>Show stash...</b>"""
922 """<p>This shows a dialog with a patch of a selectable"""
923 """ stash.</p>"""
924 )
925 )
735 self.gitStashShowAct.triggered.connect(self.__gitStashShow) 926 self.gitStashShowAct.triggered.connect(self.__gitStashShow)
736 self.actions.append(self.gitStashShowAct) 927 self.actions.append(self.gitStashShowAct)
737 928
738 self.gitStashApplyAct = EricAction( 929 self.gitStashApplyAct = EricAction(
739 self.tr('Restore && Keep'), 930 self.tr("Restore && Keep"),
740 self.tr('Restore && Keep'), 931 self.tr("Restore && Keep"),
741 0, 0, self, 'git_stash_apply') 932 0,
742 self.gitStashApplyAct.setStatusTip(self.tr( 933 0,
743 'Restore a stash but keep it' 934 self,
744 )) 935 "git_stash_apply",
745 self.gitStashApplyAct.setWhatsThis(self.tr( 936 )
746 """<b>Restore &amp; Keep</b>""" 937 self.gitStashApplyAct.setStatusTip(self.tr("Restore a stash but keep it"))
747 """<p>This restores a selectable stash and keeps it.</p>""" 938 self.gitStashApplyAct.setWhatsThis(
748 )) 939 self.tr(
940 """<b>Restore &amp; Keep</b>"""
941 """<p>This restores a selectable stash and keeps it.</p>"""
942 )
943 )
749 self.gitStashApplyAct.triggered.connect(self.__gitStashApply) 944 self.gitStashApplyAct.triggered.connect(self.__gitStashApply)
750 self.actions.append(self.gitStashApplyAct) 945 self.actions.append(self.gitStashApplyAct)
751 946
752 self.gitStashPopAct = EricAction( 947 self.gitStashPopAct = EricAction(
753 self.tr('Restore && Delete'), 948 self.tr("Restore && Delete"),
754 self.tr('Restore && Delete'), 949 self.tr("Restore && Delete"),
755 0, 0, self, 'git_stash_pop') 950 0,
756 self.gitStashPopAct.setStatusTip(self.tr( 951 0,
757 'Restore a stash and delete it' 952 self,
758 )) 953 "git_stash_pop",
759 self.gitStashPopAct.setWhatsThis(self.tr( 954 )
760 """<b>Restore &amp; Delete</b>""" 955 self.gitStashPopAct.setStatusTip(self.tr("Restore a stash and delete it"))
761 """<p>This restores a selectable stash and deletes it.</p>""" 956 self.gitStashPopAct.setWhatsThis(
762 )) 957 self.tr(
958 """<b>Restore &amp; Delete</b>"""
959 """<p>This restores a selectable stash and deletes it.</p>"""
960 )
961 )
763 self.gitStashPopAct.triggered.connect(self.__gitStashPop) 962 self.gitStashPopAct.triggered.connect(self.__gitStashPop)
764 self.actions.append(self.gitStashPopAct) 963 self.actions.append(self.gitStashPopAct)
765 964
766 self.gitStashBranchAct = EricAction( 965 self.gitStashBranchAct = EricAction(
767 self.tr('Create Branch'), 966 self.tr("Create Branch"),
768 self.tr('Create Branch'), 967 self.tr("Create Branch"),
769 0, 0, self, 'git_stash_branch') 968 0,
770 self.gitStashBranchAct.setStatusTip(self.tr( 969 0,
771 'Create a new branch and restore a stash into it' 970 self,
772 )) 971 "git_stash_branch",
773 self.gitStashBranchAct.setWhatsThis(self.tr( 972 )
774 """<b>Create Branch</b>""" 973 self.gitStashBranchAct.setStatusTip(
775 """<p>This creates a new branch and restores a stash into""" 974 self.tr("Create a new branch and restore a stash into it")
776 """ it.</p>""" 975 )
777 )) 976 self.gitStashBranchAct.setWhatsThis(
977 self.tr(
978 """<b>Create Branch</b>"""
979 """<p>This creates a new branch and restores a stash into"""
980 """ it.</p>"""
981 )
982 )
778 self.gitStashBranchAct.triggered.connect(self.__gitStashBranch) 983 self.gitStashBranchAct.triggered.connect(self.__gitStashBranch)
779 self.actions.append(self.gitStashBranchAct) 984 self.actions.append(self.gitStashBranchAct)
780 985
781 self.gitStashDropAct = EricAction( 986 self.gitStashDropAct = EricAction(
782 self.tr('Delete'), 987 self.tr("Delete"), self.tr("Delete"), 0, 0, self, "git_stash_delete"
783 self.tr('Delete'), 988 )
784 0, 0, self, 'git_stash_delete') 989 self.gitStashDropAct.setStatusTip(self.tr("Delete a stash"))
785 self.gitStashDropAct.setStatusTip(self.tr( 990 self.gitStashDropAct.setWhatsThis(
786 'Delete a stash' 991 self.tr("""<b>Delete</b>""" """<p>This deletes a stash.</p>""")
787 )) 992 )
788 self.gitStashDropAct.setWhatsThis(self.tr(
789 """<b>Delete</b>"""
790 """<p>This deletes a stash.</p>"""
791 ))
792 self.gitStashDropAct.triggered.connect(self.__gitStashDrop) 993 self.gitStashDropAct.triggered.connect(self.__gitStashDrop)
793 self.actions.append(self.gitStashDropAct) 994 self.actions.append(self.gitStashDropAct)
794 995
795 self.gitStashClearAct = EricAction( 996 self.gitStashClearAct = EricAction(
796 self.tr('Delete All'), 997 self.tr("Delete All"),
797 self.tr('Delete All'), 998 self.tr("Delete All"),
798 0, 0, self, 'git_stash_delete_all') 999 0,
799 self.gitStashClearAct.setStatusTip(self.tr( 1000 0,
800 'Delete all stashes' 1001 self,
801 )) 1002 "git_stash_delete_all",
802 self.gitStashClearAct.setWhatsThis(self.tr( 1003 )
803 """<b>Delete All</b>""" 1004 self.gitStashClearAct.setStatusTip(self.tr("Delete all stashes"))
804 """<p>This deletes all stashes.</p>""" 1005 self.gitStashClearAct.setWhatsThis(
805 )) 1006 self.tr("""<b>Delete All</b>""" """<p>This deletes all stashes.</p>""")
1007 )
806 self.gitStashClearAct.triggered.connect(self.__gitStashClear) 1008 self.gitStashClearAct.triggered.connect(self.__gitStashClear)
807 self.actions.append(self.gitStashClearAct) 1009 self.actions.append(self.gitStashClearAct)
808 1010
809 self.gitEditUserConfigAct = EricAction( 1011 self.gitEditUserConfigAct = EricAction(
810 self.tr('Edit user configuration'), 1012 self.tr("Edit user configuration"),
811 self.tr('Edit user configuration...'), 1013 self.tr("Edit user configuration..."),
812 0, 0, self, 'git_user_configure') 1014 0,
813 self.gitEditUserConfigAct.setStatusTip(self.tr( 1015 0,
814 'Show an editor to edit the user configuration file' 1016 self,
815 )) 1017 "git_user_configure",
816 self.gitEditUserConfigAct.setWhatsThis(self.tr( 1018 )
817 """<b>Edit user configuration</b>""" 1019 self.gitEditUserConfigAct.setStatusTip(
818 """<p>Show an editor to edit the user configuration file.</p>""" 1020 self.tr("Show an editor to edit the user configuration file")
819 )) 1021 )
1022 self.gitEditUserConfigAct.setWhatsThis(
1023 self.tr(
1024 """<b>Edit user configuration</b>"""
1025 """<p>Show an editor to edit the user configuration file.</p>"""
1026 )
1027 )
820 self.gitEditUserConfigAct.triggered.connect(self.__gitEditUserConfig) 1028 self.gitEditUserConfigAct.triggered.connect(self.__gitEditUserConfig)
821 self.actions.append(self.gitEditUserConfigAct) 1029 self.actions.append(self.gitEditUserConfigAct)
822 1030
823 self.gitRepoConfigAct = EricAction( 1031 self.gitRepoConfigAct = EricAction(
824 self.tr('Edit repository configuration'), 1032 self.tr("Edit repository configuration"),
825 self.tr('Edit repository configuration...'), 1033 self.tr("Edit repository configuration..."),
826 0, 0, self, 'git_repo_configure') 1034 0,
827 self.gitRepoConfigAct.setStatusTip(self.tr( 1035 0,
828 'Show an editor to edit the repository configuration file' 1036 self,
829 )) 1037 "git_repo_configure",
830 self.gitRepoConfigAct.setWhatsThis(self.tr( 1038 )
831 """<b>Edit repository configuration</b>""" 1039 self.gitRepoConfigAct.setStatusTip(
832 """<p>Show an editor to edit the repository configuration""" 1040 self.tr("Show an editor to edit the repository configuration file")
833 """ file.</p>""" 1041 )
834 )) 1042 self.gitRepoConfigAct.setWhatsThis(
1043 self.tr(
1044 """<b>Edit repository configuration</b>"""
1045 """<p>Show an editor to edit the repository configuration"""
1046 """ file.</p>"""
1047 )
1048 )
835 self.gitRepoConfigAct.triggered.connect(self.__gitEditRepoConfig) 1049 self.gitRepoConfigAct.triggered.connect(self.__gitEditRepoConfig)
836 self.actions.append(self.gitRepoConfigAct) 1050 self.actions.append(self.gitRepoConfigAct)
837 1051
838 self.gitCreateIgnoreAct = EricAction( 1052 self.gitCreateIgnoreAct = EricAction(
839 self.tr('Create .gitignore'), 1053 self.tr("Create .gitignore"),
840 self.tr('Create .gitignore'), 1054 self.tr("Create .gitignore"),
841 0, 0, self, 'git_create_ignore') 1055 0,
842 self.gitCreateIgnoreAct.setStatusTip(self.tr( 1056 0,
843 'Create a .gitignore file with default values' 1057 self,
844 )) 1058 "git_create_ignore",
845 self.gitCreateIgnoreAct.setWhatsThis(self.tr( 1059 )
846 """<b>Create .gitignore</b>""" 1060 self.gitCreateIgnoreAct.setStatusTip(
847 """<p>This creates a .gitignore file with default values.</p>""" 1061 self.tr("Create a .gitignore file with default values")
848 )) 1062 )
1063 self.gitCreateIgnoreAct.setWhatsThis(
1064 self.tr(
1065 """<b>Create .gitignore</b>"""
1066 """<p>This creates a .gitignore file with default values.</p>"""
1067 )
1068 )
849 self.gitCreateIgnoreAct.triggered.connect(self.__gitCreateIgnore) 1069 self.gitCreateIgnoreAct.triggered.connect(self.__gitCreateIgnore)
850 self.actions.append(self.gitCreateIgnoreAct) 1070 self.actions.append(self.gitCreateIgnoreAct)
851 1071
852 self.gitShowConfigAct = EricAction( 1072 self.gitShowConfigAct = EricAction(
853 self.tr('Show combined configuration settings'), 1073 self.tr("Show combined configuration settings"),
854 self.tr('Show combined configuration settings...'), 1074 self.tr("Show combined configuration settings..."),
855 0, 0, self, 'git_show_config') 1075 0,
856 self.gitShowConfigAct.setStatusTip(self.tr( 1076 0,
857 'Show the combined configuration settings from all configuration' 1077 self,
858 ' files' 1078 "git_show_config",
859 )) 1079 )
860 self.gitShowConfigAct.setWhatsThis(self.tr( 1080 self.gitShowConfigAct.setStatusTip(
861 """<b>Show combined configuration settings</b>""" 1081 self.tr(
862 """<p>This shows the combined configuration settings""" 1082 "Show the combined configuration settings from all configuration"
863 """ from all configuration files.</p>""" 1083 " files"
864 )) 1084 )
1085 )
1086 self.gitShowConfigAct.setWhatsThis(
1087 self.tr(
1088 """<b>Show combined configuration settings</b>"""
1089 """<p>This shows the combined configuration settings"""
1090 """ from all configuration files.</p>"""
1091 )
1092 )
865 self.gitShowConfigAct.triggered.connect(self.__gitShowConfig) 1093 self.gitShowConfigAct.triggered.connect(self.__gitShowConfig)
866 self.actions.append(self.gitShowConfigAct) 1094 self.actions.append(self.gitShowConfigAct)
867 1095
868 self.gitVerifyAct = EricAction( 1096 self.gitVerifyAct = EricAction(
869 self.tr('Verify repository'), 1097 self.tr("Verify repository"),
870 self.tr('Verify repository...'), 1098 self.tr("Verify repository..."),
871 0, 0, self, 'git_verify') 1099 0,
872 self.gitVerifyAct.setStatusTip(self.tr( 1100 0,
873 'Verify the connectivity and validity of objects of the database' 1101 self,
874 )) 1102 "git_verify",
875 self.gitVerifyAct.setWhatsThis(self.tr( 1103 )
876 """<b>Verify repository</b>""" 1104 self.gitVerifyAct.setStatusTip(
877 """<p>This verifies the connectivity and validity of objects""" 1105 self.tr("Verify the connectivity and validity of objects of the database")
878 """ of the database.</p>""" 1106 )
879 )) 1107 self.gitVerifyAct.setWhatsThis(
1108 self.tr(
1109 """<b>Verify repository</b>"""
1110 """<p>This verifies the connectivity and validity of objects"""
1111 """ of the database.</p>"""
1112 )
1113 )
880 self.gitVerifyAct.triggered.connect(self.__gitVerify) 1114 self.gitVerifyAct.triggered.connect(self.__gitVerify)
881 self.actions.append(self.gitVerifyAct) 1115 self.actions.append(self.gitVerifyAct)
882 1116
883 self.gitHouseKeepingAct = EricAction( 1117 self.gitHouseKeepingAct = EricAction(
884 self.tr('Optimize repository'), 1118 self.tr("Optimize repository"),
885 self.tr('Optimize repository...'), 1119 self.tr("Optimize repository..."),
886 0, 0, self, 'git_housekeeping') 1120 0,
887 self.gitHouseKeepingAct.setStatusTip(self.tr( 1121 0,
888 'Cleanup and optimize the local repository' 1122 self,
889 )) 1123 "git_housekeeping",
890 self.gitHouseKeepingAct.setWhatsThis(self.tr( 1124 )
891 """<b>Optimize repository</b>""" 1125 self.gitHouseKeepingAct.setStatusTip(
892 """<p>This cleans up and optimizes the local repository.</p>""" 1126 self.tr("Cleanup and optimize the local repository")
893 )) 1127 )
1128 self.gitHouseKeepingAct.setWhatsThis(
1129 self.tr(
1130 """<b>Optimize repository</b>"""
1131 """<p>This cleans up and optimizes the local repository.</p>"""
1132 )
1133 )
894 self.gitHouseKeepingAct.triggered.connect(self.__gitHouseKeeping) 1134 self.gitHouseKeepingAct.triggered.connect(self.__gitHouseKeeping)
895 self.actions.append(self.gitHouseKeepingAct) 1135 self.actions.append(self.gitHouseKeepingAct)
896 1136
897 self.gitStatisticsAct = EricAction( 1137 self.gitStatisticsAct = EricAction(
898 self.tr('Repository Statistics'), 1138 self.tr("Repository Statistics"),
899 self.tr('Repository Statistics...'), 1139 self.tr("Repository Statistics..."),
900 0, 0, self, 'git_statistics') 1140 0,
901 self.gitStatisticsAct.setStatusTip(self.tr( 1141 0,
902 'Show some statistics of the local repository' 1142 self,
903 )) 1143 "git_statistics",
904 self.gitStatisticsAct.setWhatsThis(self.tr( 1144 )
905 """<b>Repository Statistics</b>""" 1145 self.gitStatisticsAct.setStatusTip(
906 """<p>This show some statistics of the local repository.</p>""" 1146 self.tr("Show some statistics of the local repository")
907 )) 1147 )
1148 self.gitStatisticsAct.setWhatsThis(
1149 self.tr(
1150 """<b>Repository Statistics</b>"""
1151 """<p>This show some statistics of the local repository.</p>"""
1152 )
1153 )
908 self.gitStatisticsAct.triggered.connect(self.__gitStatistics) 1154 self.gitStatisticsAct.triggered.connect(self.__gitStatistics)
909 self.actions.append(self.gitStatisticsAct) 1155 self.actions.append(self.gitStatisticsAct)
910 1156
911 self.gitCreateArchiveAct = EricAction( 1157 self.gitCreateArchiveAct = EricAction(
912 self.tr('Create Archive'), 1158 self.tr("Create Archive"),
913 self.tr('Create Archive'), 1159 self.tr("Create Archive"),
914 0, 0, self, 'git_create_archive') 1160 0,
915 self.gitCreateArchiveAct.setStatusTip(self.tr( 1161 0,
916 'Create an archive from the local repository' 1162 self,
917 )) 1163 "git_create_archive",
918 self.gitCreateArchiveAct.setWhatsThis(self.tr( 1164 )
919 """<b>Create Archive</b>""" 1165 self.gitCreateArchiveAct.setStatusTip(
920 """<p>This creates an archive from the local repository.</p>""" 1166 self.tr("Create an archive from the local repository")
921 )) 1167 )
1168 self.gitCreateArchiveAct.setWhatsThis(
1169 self.tr(
1170 """<b>Create Archive</b>"""
1171 """<p>This creates an archive from the local repository.</p>"""
1172 )
1173 )
922 self.gitCreateArchiveAct.triggered.connect(self.__gitCreateArchive) 1174 self.gitCreateArchiveAct.triggered.connect(self.__gitCreateArchive)
923 self.actions.append(self.gitCreateArchiveAct) 1175 self.actions.append(self.gitCreateArchiveAct)
924 1176
925 self.gitBundleAct = EricAction( 1177 self.gitBundleAct = EricAction(
926 self.tr('Create bundle'), 1178 self.tr("Create bundle"),
927 self.tr('Create bundle...'), 1179 self.tr("Create bundle..."),
928 0, 0, self, 'mercurial_bundle_create') 1180 0,
929 self.gitBundleAct.setStatusTip(self.tr( 1181 0,
930 'Create bundle file collecting changesets' 1182 self,
931 )) 1183 "mercurial_bundle_create",
932 self.gitBundleAct.setWhatsThis(self.tr( 1184 )
933 """<b>Create bundle</b>""" 1185 self.gitBundleAct.setStatusTip(
934 """<p>This creates a bundle file collecting selected""" 1186 self.tr("Create bundle file collecting changesets")
935 """ changesets (git bundle create).</p>""" 1187 )
936 )) 1188 self.gitBundleAct.setWhatsThis(
1189 self.tr(
1190 """<b>Create bundle</b>"""
1191 """<p>This creates a bundle file collecting selected"""
1192 """ changesets (git bundle create).</p>"""
1193 )
1194 )
937 self.gitBundleAct.triggered.connect(self.__gitBundle) 1195 self.gitBundleAct.triggered.connect(self.__gitBundle)
938 self.actions.append(self.gitBundleAct) 1196 self.actions.append(self.gitBundleAct)
939 1197
940 self.gitBundleVerifyAct = EricAction( 1198 self.gitBundleVerifyAct = EricAction(
941 self.tr('Verify bundle'), 1199 self.tr("Verify bundle"),
942 self.tr('Verify bundle...'), 1200 self.tr("Verify bundle..."),
943 0, 0, self, 'mercurial_bundle_verify') 1201 0,
944 self.gitBundleVerifyAct.setStatusTip(self.tr( 1202 0,
945 'Verify the validity and applicability of a bundle file' 1203 self,
946 )) 1204 "mercurial_bundle_verify",
947 self.gitBundleVerifyAct.setWhatsThis(self.tr( 1205 )
948 """<b>Verify bundle</b>""" 1206 self.gitBundleVerifyAct.setStatusTip(
949 """<p>This verifies that a bundle file is valid and will""" 1207 self.tr("Verify the validity and applicability of a bundle file")
950 """ apply cleanly.</p>""" 1208 )
951 )) 1209 self.gitBundleVerifyAct.setWhatsThis(
1210 self.tr(
1211 """<b>Verify bundle</b>"""
1212 """<p>This verifies that a bundle file is valid and will"""
1213 """ apply cleanly.</p>"""
1214 )
1215 )
952 self.gitBundleVerifyAct.triggered.connect(self.__gitVerifyBundle) 1216 self.gitBundleVerifyAct.triggered.connect(self.__gitVerifyBundle)
953 self.actions.append(self.gitBundleVerifyAct) 1217 self.actions.append(self.gitBundleVerifyAct)
954 1218
955 self.gitBundleListHeadsAct = EricAction( 1219 self.gitBundleListHeadsAct = EricAction(
956 self.tr('List bundle heads'), 1220 self.tr("List bundle heads"),
957 self.tr('List bundle heads...'), 1221 self.tr("List bundle heads..."),
958 0, 0, self, 'mercurial_bundle_list_heads') 1222 0,
959 self.gitBundleListHeadsAct.setStatusTip(self.tr( 1223 0,
960 'List all heads contained in a bundle file' 1224 self,
961 )) 1225 "mercurial_bundle_list_heads",
962 self.gitBundleListHeadsAct.setWhatsThis(self.tr( 1226 )
963 """<b>List bundle heads</b>""" 1227 self.gitBundleListHeadsAct.setStatusTip(
964 """<p>This lists all heads contained in a bundle file.</p>""" 1228 self.tr("List all heads contained in a bundle file")
965 )) 1229 )
1230 self.gitBundleListHeadsAct.setWhatsThis(
1231 self.tr(
1232 """<b>List bundle heads</b>"""
1233 """<p>This lists all heads contained in a bundle file.</p>"""
1234 )
1235 )
966 self.gitBundleListHeadsAct.triggered.connect(self.__gitBundleListHeads) 1236 self.gitBundleListHeadsAct.triggered.connect(self.__gitBundleListHeads)
967 self.actions.append(self.gitBundleListHeadsAct) 1237 self.actions.append(self.gitBundleListHeadsAct)
968 1238
969 self.gitBundleApplyFetchAct = EricAction( 1239 self.gitBundleApplyFetchAct = EricAction(
970 self.tr('Apply Bundle (fetch)'), 1240 self.tr("Apply Bundle (fetch)"),
971 self.tr('Apply Bundle (fetch)...'), 1241 self.tr("Apply Bundle (fetch)..."),
972 0, 0, self, 'mercurial_bundle_apply_fetch') 1242 0,
973 self.gitBundleApplyFetchAct.setStatusTip(self.tr( 1243 0,
974 'Apply a head of a bundle file using fetch' 1244 self,
975 )) 1245 "mercurial_bundle_apply_fetch",
976 self.gitBundleApplyFetchAct.setWhatsThis(self.tr( 1246 )
977 """<b>Apply Bundle (fetch)</b>""" 1247 self.gitBundleApplyFetchAct.setStatusTip(
978 """<p>This applies a head of a bundle file using fetch.</p>""" 1248 self.tr("Apply a head of a bundle file using fetch")
979 )) 1249 )
1250 self.gitBundleApplyFetchAct.setWhatsThis(
1251 self.tr(
1252 """<b>Apply Bundle (fetch)</b>"""
1253 """<p>This applies a head of a bundle file using fetch.</p>"""
1254 )
1255 )
980 self.gitBundleApplyFetchAct.triggered.connect(self.__gitBundleFetch) 1256 self.gitBundleApplyFetchAct.triggered.connect(self.__gitBundleFetch)
981 self.actions.append(self.gitBundleApplyFetchAct) 1257 self.actions.append(self.gitBundleApplyFetchAct)
982 1258
983 self.gitBundleApplyPullAct = EricAction( 1259 self.gitBundleApplyPullAct = EricAction(
984 self.tr('Apply Bundle (pull)'), 1260 self.tr("Apply Bundle (pull)"),
985 self.tr('Apply Bundle (pull)...'), 1261 self.tr("Apply Bundle (pull)..."),
986 0, 0, self, 'mercurial_bundle_apply_pull') 1262 0,
987 self.gitBundleApplyPullAct.setStatusTip(self.tr( 1263 0,
988 'Apply a head of a bundle file using pull' 1264 self,
989 )) 1265 "mercurial_bundle_apply_pull",
990 self.gitBundleApplyPullAct.setWhatsThis(self.tr( 1266 )
991 """<b>Apply Bundle (pull)</b>""" 1267 self.gitBundleApplyPullAct.setStatusTip(
992 """<p>This applies a head of a bundle file using pull.</p>""" 1268 self.tr("Apply a head of a bundle file using pull")
993 )) 1269 )
1270 self.gitBundleApplyPullAct.setWhatsThis(
1271 self.tr(
1272 """<b>Apply Bundle (pull)</b>"""
1273 """<p>This applies a head of a bundle file using pull.</p>"""
1274 )
1275 )
994 self.gitBundleApplyPullAct.triggered.connect(self.__gitBundlePull) 1276 self.gitBundleApplyPullAct.triggered.connect(self.__gitBundlePull)
995 self.actions.append(self.gitBundleApplyPullAct) 1277 self.actions.append(self.gitBundleApplyPullAct)
996 1278
997 self.gitBisectStartAct = EricAction( 1279 self.gitBisectStartAct = EricAction(
998 self.tr('Start'), 1280 self.tr("Start"), self.tr("Start"), 0, 0, self, "git_bisect_start"
999 self.tr('Start'), 1281 )
1000 0, 0, self, 'git_bisect_start') 1282 self.gitBisectStartAct.setStatusTip(self.tr("Start a bisect session"))
1001 self.gitBisectStartAct.setStatusTip(self.tr( 1283 self.gitBisectStartAct.setWhatsThis(
1002 'Start a bisect session' 1284 self.tr("""<b>Start</b>""" """<p>This starts a bisect session.</p>""")
1003 )) 1285 )
1004 self.gitBisectStartAct.setWhatsThis(self.tr(
1005 """<b>Start</b>"""
1006 """<p>This starts a bisect session.</p>"""
1007 ))
1008 self.gitBisectStartAct.triggered.connect(self.__gitBisectStart) 1286 self.gitBisectStartAct.triggered.connect(self.__gitBisectStart)
1009 self.actions.append(self.gitBisectStartAct) 1287 self.actions.append(self.gitBisectStartAct)
1010 1288
1011 self.gitBisectStartExtendedAct = EricAction( 1289 self.gitBisectStartExtendedAct = EricAction(
1012 self.tr('Start (Extended)'), 1290 self.tr("Start (Extended)"),
1013 self.tr('Start (Extended)'), 1291 self.tr("Start (Extended)"),
1014 0, 0, self, 'git_bisect_start_extended') 1292 0,
1015 self.gitBisectStartExtendedAct.setStatusTip(self.tr( 1293 0,
1016 'Start a bisect session giving a bad and optionally good commits' 1294 self,
1017 )) 1295 "git_bisect_start_extended",
1018 self.gitBisectStartExtendedAct.setWhatsThis(self.tr( 1296 )
1019 """<b>Start (Extended)</b>""" 1297 self.gitBisectStartExtendedAct.setStatusTip(
1020 """<p>This starts a bisect session giving a bad and optionally""" 1298 self.tr("Start a bisect session giving a bad and optionally good commits")
1021 """ good commits.</p>""" 1299 )
1022 )) 1300 self.gitBisectStartExtendedAct.setWhatsThis(
1023 self.gitBisectStartExtendedAct.triggered.connect( 1301 self.tr(
1024 self.__gitBisectStartExtended) 1302 """<b>Start (Extended)</b>"""
1303 """<p>This starts a bisect session giving a bad and optionally"""
1304 """ good commits.</p>"""
1305 )
1306 )
1307 self.gitBisectStartExtendedAct.triggered.connect(self.__gitBisectStartExtended)
1025 self.actions.append(self.gitBisectStartExtendedAct) 1308 self.actions.append(self.gitBisectStartExtendedAct)
1026 1309
1027 self.gitBisectGoodAct = EricAction( 1310 self.gitBisectGoodAct = EricAction(
1028 self.tr('Mark as "good"'), 1311 self.tr('Mark as "good"'),
1029 self.tr('Mark as "good"...'), 1312 self.tr('Mark as "good"...'),
1030 0, 0, self, 'git_bisect_good') 1313 0,
1031 self.gitBisectGoodAct.setStatusTip(self.tr( 1314 0,
1032 'Mark a selectable revision as good' 1315 self,
1033 )) 1316 "git_bisect_good",
1034 self.gitBisectGoodAct.setWhatsThis(self.tr( 1317 )
1035 """<b>Mark as "good"</b>""" 1318 self.gitBisectGoodAct.setStatusTip(
1036 """<p>This marks a selectable revision as good.</p>""" 1319 self.tr("Mark a selectable revision as good")
1037 )) 1320 )
1321 self.gitBisectGoodAct.setWhatsThis(
1322 self.tr(
1323 """<b>Mark as "good"</b>"""
1324 """<p>This marks a selectable revision as good.</p>"""
1325 )
1326 )
1038 self.gitBisectGoodAct.triggered.connect(self.__gitBisectGood) 1327 self.gitBisectGoodAct.triggered.connect(self.__gitBisectGood)
1039 self.actions.append(self.gitBisectGoodAct) 1328 self.actions.append(self.gitBisectGoodAct)
1040 1329
1041 self.gitBisectBadAct = EricAction( 1330 self.gitBisectBadAct = EricAction(
1042 self.tr('Mark as "bad"'), 1331 self.tr('Mark as "bad"'),
1043 self.tr('Mark as "bad"...'), 1332 self.tr('Mark as "bad"...'),
1044 0, 0, self, 'git_bisect_bad') 1333 0,
1045 self.gitBisectBadAct.setStatusTip(self.tr( 1334 0,
1046 'Mark a selectable revision as bad' 1335 self,
1047 )) 1336 "git_bisect_bad",
1048 self.gitBisectBadAct.setWhatsThis(self.tr( 1337 )
1049 """<b>Mark as "bad"</b>""" 1338 self.gitBisectBadAct.setStatusTip(self.tr("Mark a selectable revision as bad"))
1050 """<p>This marks a selectable revision as bad.</p>""" 1339 self.gitBisectBadAct.setWhatsThis(
1051 )) 1340 self.tr(
1341 """<b>Mark as "bad"</b>"""
1342 """<p>This marks a selectable revision as bad.</p>"""
1343 )
1344 )
1052 self.gitBisectBadAct.triggered.connect(self.__gitBisectBad) 1345 self.gitBisectBadAct.triggered.connect(self.__gitBisectBad)
1053 self.actions.append(self.gitBisectBadAct) 1346 self.actions.append(self.gitBisectBadAct)
1054 1347
1055 self.gitBisectSkipAct = EricAction( 1348 self.gitBisectSkipAct = EricAction(
1056 self.tr('Skip'), 1349 self.tr("Skip"), self.tr("Skip..."), 0, 0, self, "git_bisect_skip"
1057 self.tr('Skip...'), 1350 )
1058 0, 0, self, 'git_bisect_skip') 1351 self.gitBisectSkipAct.setStatusTip(self.tr("Skip a selectable revision"))
1059 self.gitBisectSkipAct.setStatusTip(self.tr( 1352 self.gitBisectSkipAct.setWhatsThis(
1060 'Skip a selectable revision' 1353 self.tr("""<b>Skip</b>""" """<p>This skips a selectable revision.</p>""")
1061 )) 1354 )
1062 self.gitBisectSkipAct.setWhatsThis(self.tr(
1063 """<b>Skip</b>"""
1064 """<p>This skips a selectable revision.</p>"""
1065 ))
1066 self.gitBisectSkipAct.triggered.connect(self.__gitBisectSkip) 1355 self.gitBisectSkipAct.triggered.connect(self.__gitBisectSkip)
1067 self.actions.append(self.gitBisectSkipAct) 1356 self.actions.append(self.gitBisectSkipAct)
1068 1357
1069 self.gitBisectResetAct = EricAction( 1358 self.gitBisectResetAct = EricAction(
1070 self.tr('Reset'), 1359 self.tr("Reset"), self.tr("Reset..."), 0, 0, self, "git_bisect_reset"
1071 self.tr('Reset...'), 1360 )
1072 0, 0, self, 'git_bisect_reset') 1361 self.gitBisectResetAct.setStatusTip(self.tr("Reset the bisect session"))
1073 self.gitBisectResetAct.setStatusTip(self.tr( 1362 self.gitBisectResetAct.setWhatsThis(
1074 'Reset the bisect session' 1363 self.tr("""<b>Reset</b>""" """<p>This resets the bisect session.</p>""")
1075 )) 1364 )
1076 self.gitBisectResetAct.setWhatsThis(self.tr(
1077 """<b>Reset</b>"""
1078 """<p>This resets the bisect session.</p>"""
1079 ))
1080 self.gitBisectResetAct.triggered.connect(self.__gitBisectReset) 1365 self.gitBisectResetAct.triggered.connect(self.__gitBisectReset)
1081 self.actions.append(self.gitBisectResetAct) 1366 self.actions.append(self.gitBisectResetAct)
1082 1367
1083 self.gitBisectLogBrowserAct = EricAction( 1368 self.gitBisectLogBrowserAct = EricAction(
1084 self.tr('Show bisect log browser'), 1369 self.tr("Show bisect log browser"),
1085 UI.PixmapCache.getIcon("vcsLog"), 1370 UI.PixmapCache.getIcon("vcsLog"),
1086 self.tr('Show bisect log browser'), 1371 self.tr("Show bisect log browser"),
1087 0, 0, self, 'git_bisect_log_browser') 1372 0,
1088 self.gitBisectLogBrowserAct.setStatusTip(self.tr( 1373 0,
1089 'Show a dialog to browse the bisect log of the local project' 1374 self,
1090 )) 1375 "git_bisect_log_browser",
1091 self.gitBisectLogBrowserAct.setWhatsThis(self.tr( 1376 )
1092 """<b>Show bisect log browser</b>""" 1377 self.gitBisectLogBrowserAct.setStatusTip(
1093 """<p>This shows a dialog to browse the bisect log of the local""" 1378 self.tr("Show a dialog to browse the bisect log of the local project")
1094 """ project.</p>""" 1379 )
1095 )) 1380 self.gitBisectLogBrowserAct.setWhatsThis(
1096 self.gitBisectLogBrowserAct.triggered.connect( 1381 self.tr(
1097 self.__gitBisectLogBrowser) 1382 """<b>Show bisect log browser</b>"""
1383 """<p>This shows a dialog to browse the bisect log of the local"""
1384 """ project.</p>"""
1385 )
1386 )
1387 self.gitBisectLogBrowserAct.triggered.connect(self.__gitBisectLogBrowser)
1098 self.actions.append(self.gitBisectLogBrowserAct) 1388 self.actions.append(self.gitBisectLogBrowserAct)
1099 1389
1100 self.gitBisectCreateReplayAct = EricAction( 1390 self.gitBisectCreateReplayAct = EricAction(
1101 self.tr('Create replay file'), 1391 self.tr("Create replay file"),
1102 self.tr('Create replay file'), 1392 self.tr("Create replay file"),
1103 0, 0, self, 'git_bisect_create_replay') 1393 0,
1104 self.gitBisectCreateReplayAct.setStatusTip(self.tr( 1394 0,
1105 'Create a replay file to repeat the current bisect session' 1395 self,
1106 )) 1396 "git_bisect_create_replay",
1107 self.gitBisectCreateReplayAct.setWhatsThis(self.tr( 1397 )
1108 """<b>Create replay file</b>""" 1398 self.gitBisectCreateReplayAct.setStatusTip(
1109 """<p>This creates a replay file to repeat the current bisect""" 1399 self.tr("Create a replay file to repeat the current bisect session")
1110 """ session.</p>""" 1400 )
1111 )) 1401 self.gitBisectCreateReplayAct.setWhatsThis(
1112 self.gitBisectCreateReplayAct.triggered.connect( 1402 self.tr(
1113 self.__gitBisectCreateReplay) 1403 """<b>Create replay file</b>"""
1404 """<p>This creates a replay file to repeat the current bisect"""
1405 """ session.</p>"""
1406 )
1407 )
1408 self.gitBisectCreateReplayAct.triggered.connect(self.__gitBisectCreateReplay)
1114 self.actions.append(self.gitBisectCreateReplayAct) 1409 self.actions.append(self.gitBisectCreateReplayAct)
1115 1410
1116 self.gitBisectEditReplayAct = EricAction( 1411 self.gitBisectEditReplayAct = EricAction(
1117 self.tr('Edit replay file'), 1412 self.tr("Edit replay file"),
1118 self.tr('Edit replay file'), 1413 self.tr("Edit replay file"),
1119 0, 0, self, 'git_bisect_edit_replay') 1414 0,
1120 self.gitBisectEditReplayAct.setStatusTip(self.tr( 1415 0,
1121 'Edit a bisect replay file' 1416 self,
1122 )) 1417 "git_bisect_edit_replay",
1123 self.gitBisectEditReplayAct.setWhatsThis(self.tr( 1418 )
1124 """<b>Edit replay file</b>""" 1419 self.gitBisectEditReplayAct.setStatusTip(self.tr("Edit a bisect replay file"))
1125 """<p>This edits a bisect replay file.</p>""" 1420 self.gitBisectEditReplayAct.setWhatsThis(
1126 )) 1421 self.tr(
1127 self.gitBisectEditReplayAct.triggered.connect( 1422 """<b>Edit replay file</b>"""
1128 self.__gitBisectEditReplay) 1423 """<p>This edits a bisect replay file.</p>"""
1424 )
1425 )
1426 self.gitBisectEditReplayAct.triggered.connect(self.__gitBisectEditReplay)
1129 self.actions.append(self.gitBisectEditReplayAct) 1427 self.actions.append(self.gitBisectEditReplayAct)
1130 1428
1131 self.gitBisectReplayAct = EricAction( 1429 self.gitBisectReplayAct = EricAction(
1132 self.tr('Replay session'), 1430 self.tr("Replay session"),
1133 self.tr('Replay session'), 1431 self.tr("Replay session"),
1134 0, 0, self, 'git_bisect_replay') 1432 0,
1135 self.gitBisectReplayAct.setStatusTip(self.tr( 1433 0,
1136 'Replay a bisect session from file' 1434 self,
1137 )) 1435 "git_bisect_replay",
1138 self.gitBisectReplayAct.setWhatsThis(self.tr( 1436 )
1139 """<b>Replay session</b>""" 1437 self.gitBisectReplayAct.setStatusTip(
1140 """<p>This replays a bisect session from file.</p>""" 1438 self.tr("Replay a bisect session from file")
1141 )) 1439 )
1440 self.gitBisectReplayAct.setWhatsThis(
1441 self.tr(
1442 """<b>Replay session</b>"""
1443 """<p>This replays a bisect session from file.</p>"""
1444 )
1445 )
1142 self.gitBisectReplayAct.triggered.connect(self.__gitBisectReplay) 1446 self.gitBisectReplayAct.triggered.connect(self.__gitBisectReplay)
1143 self.actions.append(self.gitBisectReplayAct) 1447 self.actions.append(self.gitBisectReplayAct)
1144 1448
1145 self.gitCheckPatchesAct = EricAction( 1449 self.gitCheckPatchesAct = EricAction(
1146 self.tr('Check patch files'), 1450 self.tr("Check patch files"),
1147 self.tr('Check patch files'), 1451 self.tr("Check patch files"),
1148 0, 0, self, 'git_check_patches') 1452 0,
1149 self.gitCheckPatchesAct.setStatusTip(self.tr( 1453 0,
1150 'Check a list of patch files, if they would apply cleanly' 1454 self,
1151 )) 1455 "git_check_patches",
1152 self.gitCheckPatchesAct.setWhatsThis(self.tr( 1456 )
1153 """<b>Check patch files</b>""" 1457 self.gitCheckPatchesAct.setStatusTip(
1154 """<p>This checks a list of patch files, if they would apply""" 1458 self.tr("Check a list of patch files, if they would apply cleanly")
1155 """ cleanly.</p>""" 1459 )
1156 )) 1460 self.gitCheckPatchesAct.setWhatsThis(
1461 self.tr(
1462 """<b>Check patch files</b>"""
1463 """<p>This checks a list of patch files, if they would apply"""
1464 """ cleanly.</p>"""
1465 )
1466 )
1157 self.gitCheckPatchesAct.triggered.connect(self.__gitCheckPatches) 1467 self.gitCheckPatchesAct.triggered.connect(self.__gitCheckPatches)
1158 self.actions.append(self.gitCheckPatchesAct) 1468 self.actions.append(self.gitCheckPatchesAct)
1159 1469
1160 self.gitApplyPatchesAct = EricAction( 1470 self.gitApplyPatchesAct = EricAction(
1161 self.tr('Apply patch files'), 1471 self.tr("Apply patch files"),
1162 self.tr('Apply patch files'), 1472 self.tr("Apply patch files"),
1163 0, 0, self, 'git_apply_patches') 1473 0,
1164 self.gitApplyPatchesAct.setStatusTip(self.tr( 1474 0,
1165 'Apply a list of patch files' 1475 self,
1166 )) 1476 "git_apply_patches",
1167 self.gitApplyPatchesAct.setWhatsThis(self.tr( 1477 )
1168 """<b>Apply patch files</b>""" 1478 self.gitApplyPatchesAct.setStatusTip(self.tr("Apply a list of patch files"))
1169 """<p>This applies a list of patch files.</p>""" 1479 self.gitApplyPatchesAct.setWhatsThis(
1170 )) 1480 self.tr(
1481 """<b>Apply patch files</b>"""
1482 """<p>This applies a list of patch files.</p>"""
1483 )
1484 )
1171 self.gitApplyPatchesAct.triggered.connect(self.__gitApplyPatches) 1485 self.gitApplyPatchesAct.triggered.connect(self.__gitApplyPatches)
1172 self.actions.append(self.gitApplyPatchesAct) 1486 self.actions.append(self.gitApplyPatchesAct)
1173 1487
1174 self.gitShowPatcheStatisticsAct = EricAction( 1488 self.gitShowPatcheStatisticsAct = EricAction(
1175 self.tr('Show patch statistics'), 1489 self.tr("Show patch statistics"),
1176 self.tr('Show patch statistics'), 1490 self.tr("Show patch statistics"),
1177 0, 0, self, 'git_show_patches_statistics') 1491 0,
1178 self.gitShowPatcheStatisticsAct.setStatusTip(self.tr( 1492 0,
1179 'Show some statistics for a list of patch files' 1493 self,
1180 )) 1494 "git_show_patches_statistics",
1181 self.gitShowPatcheStatisticsAct.setWhatsThis(self.tr( 1495 )
1182 """<b>Show patch statistics</b>""" 1496 self.gitShowPatcheStatisticsAct.setStatusTip(
1183 """<p>This shows some statistics for a list of patch files.</p>""" 1497 self.tr("Show some statistics for a list of patch files")
1184 )) 1498 )
1185 self.gitShowPatcheStatisticsAct.triggered.connect( 1499 self.gitShowPatcheStatisticsAct.setWhatsThis(
1186 self.__gitShowPatchStatistics) 1500 self.tr(
1501 """<b>Show patch statistics</b>"""
1502 """<p>This shows some statistics for a list of patch files.</p>"""
1503 )
1504 )
1505 self.gitShowPatcheStatisticsAct.triggered.connect(self.__gitShowPatchStatistics)
1187 self.actions.append(self.gitShowPatcheStatisticsAct) 1506 self.actions.append(self.gitShowPatcheStatisticsAct)
1188 1507
1189 self.gitSubmoduleAddAct = EricAction( 1508 self.gitSubmoduleAddAct = EricAction(
1190 self.tr('Add'), 1509 self.tr("Add"), self.tr("Add"), 0, 0, self, "git_submodule_add"
1191 self.tr('Add'), 1510 )
1192 0, 0, self, 'git_submodule_add') 1511 self.gitSubmoduleAddAct.setStatusTip(
1193 self.gitSubmoduleAddAct.setStatusTip(self.tr( 1512 self.tr("Add a submodule to the current project")
1194 'Add a submodule to the current project' 1513 )
1195 )) 1514 self.gitSubmoduleAddAct.setWhatsThis(
1196 self.gitSubmoduleAddAct.setWhatsThis(self.tr( 1515 self.tr(
1197 """<b>Add</b>""" 1516 """<b>Add</b>"""
1198 """<p>This adds a submodule to the current project.</p>""" 1517 """<p>This adds a submodule to the current project.</p>"""
1199 )) 1518 )
1200 self.gitSubmoduleAddAct.triggered.connect( 1519 )
1201 self.__gitSubmoduleAdd) 1520 self.gitSubmoduleAddAct.triggered.connect(self.__gitSubmoduleAdd)
1202 self.actions.append(self.gitSubmoduleAddAct) 1521 self.actions.append(self.gitSubmoduleAddAct)
1203 1522
1204 self.gitSubmodulesListAct = EricAction( 1523 self.gitSubmodulesListAct = EricAction(
1205 self.tr('List'), 1524 self.tr("List"), self.tr("List"), 0, 0, self, "git_submodules_list"
1206 self.tr('List'), 1525 )
1207 0, 0, self, 'git_submodules_list') 1526 self.gitSubmodulesListAct.setStatusTip(
1208 self.gitSubmodulesListAct.setStatusTip(self.tr( 1527 self.tr("List the submodule of the current project")
1209 'List the submodule of the current project' 1528 )
1210 )) 1529 self.gitSubmodulesListAct.setWhatsThis(
1211 self.gitSubmodulesListAct.setWhatsThis(self.tr( 1530 self.tr(
1212 """<b>List</b>""" 1531 """<b>List</b>"""
1213 """<p>This lists the submodules of the current project.</p>""" 1532 """<p>This lists the submodules of the current project.</p>"""
1214 )) 1533 )
1215 self.gitSubmodulesListAct.triggered.connect( 1534 )
1216 self.__gitSubmodulesList) 1535 self.gitSubmodulesListAct.triggered.connect(self.__gitSubmodulesList)
1217 self.actions.append(self.gitSubmodulesListAct) 1536 self.actions.append(self.gitSubmodulesListAct)
1218 1537
1219 self.gitSubmodulesInitAct = EricAction( 1538 self.gitSubmodulesInitAct = EricAction(
1220 self.tr('Initialize'), 1539 self.tr("Initialize"),
1221 self.tr('Initialize'), 1540 self.tr("Initialize"),
1222 0, 0, self, 'git_submodules_init') 1541 0,
1223 self.gitSubmodulesInitAct.setStatusTip(self.tr( 1542 0,
1224 'Initialize the submodules of the current project' 1543 self,
1225 )) 1544 "git_submodules_init",
1226 self.gitSubmodulesInitAct.setWhatsThis(self.tr( 1545 )
1227 """<b>Initialize</b>""" 1546 self.gitSubmodulesInitAct.setStatusTip(
1228 """<p>This initializes the submodules of the current""" 1547 self.tr("Initialize the submodules of the current project")
1229 """ project.</p>""" 1548 )
1230 )) 1549 self.gitSubmodulesInitAct.setWhatsThis(
1231 self.gitSubmodulesInitAct.triggered.connect( 1550 self.tr(
1232 self.__gitSubmodulesInit) 1551 """<b>Initialize</b>"""
1552 """<p>This initializes the submodules of the current"""
1553 """ project.</p>"""
1554 )
1555 )
1556 self.gitSubmodulesInitAct.triggered.connect(self.__gitSubmodulesInit)
1233 self.actions.append(self.gitSubmodulesInitAct) 1557 self.actions.append(self.gitSubmodulesInitAct)
1234 1558
1235 self.gitSubmodulesDeinitAct = EricAction( 1559 self.gitSubmodulesDeinitAct = EricAction(
1236 self.tr('Unregister'), 1560 self.tr("Unregister"),
1237 self.tr('Unregister'), 1561 self.tr("Unregister"),
1238 0, 0, self, 'git_submodules_deinit') 1562 0,
1239 self.gitSubmodulesDeinitAct.setStatusTip(self.tr( 1563 0,
1240 'Unregister submodules of the current project' 1564 self,
1241 )) 1565 "git_submodules_deinit",
1242 self.gitSubmodulesDeinitAct.setWhatsThis(self.tr( 1566 )
1243 """<b>Unregister</b>""" 1567 self.gitSubmodulesDeinitAct.setStatusTip(
1244 """<p>This unregisters submodules of the current project.</p>""" 1568 self.tr("Unregister submodules of the current project")
1245 )) 1569 )
1246 self.gitSubmodulesDeinitAct.triggered.connect( 1570 self.gitSubmodulesDeinitAct.setWhatsThis(
1247 self.__gitSubmodulesDeinit) 1571 self.tr(
1572 """<b>Unregister</b>"""
1573 """<p>This unregisters submodules of the current project.</p>"""
1574 )
1575 )
1576 self.gitSubmodulesDeinitAct.triggered.connect(self.__gitSubmodulesDeinit)
1248 self.actions.append(self.gitSubmodulesDeinitAct) 1577 self.actions.append(self.gitSubmodulesDeinitAct)
1249 1578
1250 self.gitSubmodulesUpdateAct = EricAction( 1579 self.gitSubmodulesUpdateAct = EricAction(
1251 self.tr('Update'), 1580 self.tr("Update"), self.tr("Update"), 0, 0, self, "git_submodules_update"
1252 self.tr('Update'), 1581 )
1253 0, 0, self, 'git_submodules_update') 1582 self.gitSubmodulesUpdateAct.setStatusTip(
1254 self.gitSubmodulesUpdateAct.setStatusTip(self.tr( 1583 self.tr("Update submodules of the current project")
1255 'Update submodules of the current project' 1584 )
1256 )) 1585 self.gitSubmodulesUpdateAct.setWhatsThis(
1257 self.gitSubmodulesUpdateAct.setWhatsThis(self.tr( 1586 self.tr(
1258 """<b>Update</b>""" 1587 """<b>Update</b>"""
1259 """<p>This updates submodules of the current project.</p>""" 1588 """<p>This updates submodules of the current project.</p>"""
1260 )) 1589 )
1261 self.gitSubmodulesUpdateAct.triggered.connect( 1590 )
1262 self.__gitSubmodulesUpdate) 1591 self.gitSubmodulesUpdateAct.triggered.connect(self.__gitSubmodulesUpdate)
1263 self.actions.append(self.gitSubmodulesUpdateAct) 1592 self.actions.append(self.gitSubmodulesUpdateAct)
1264 1593
1265 self.gitSubmodulesUpdateInitAct = EricAction( 1594 self.gitSubmodulesUpdateInitAct = EricAction(
1266 self.tr('Initialize and Update'), 1595 self.tr("Initialize and Update"),
1267 self.tr('Initialize and Update'), 1596 self.tr("Initialize and Update"),
1268 0, 0, self, 'git_submodules_update_init') 1597 0,
1269 self.gitSubmodulesUpdateInitAct.setStatusTip(self.tr( 1598 0,
1270 'Initialize and update submodules of the current project' 1599 self,
1271 )) 1600 "git_submodules_update_init",
1272 self.gitSubmodulesUpdateInitAct.setWhatsThis(self.tr( 1601 )
1273 """<b>Initialize and Update</b>""" 1602 self.gitSubmodulesUpdateInitAct.setStatusTip(
1274 """<p>This initializes and updates submodules of the current""" 1603 self.tr("Initialize and update submodules of the current project")
1275 """ project.</p>""" 1604 )
1276 )) 1605 self.gitSubmodulesUpdateInitAct.setWhatsThis(
1606 self.tr(
1607 """<b>Initialize and Update</b>"""
1608 """<p>This initializes and updates submodules of the current"""
1609 """ project.</p>"""
1610 )
1611 )
1277 self.gitSubmodulesUpdateInitAct.triggered.connect( 1612 self.gitSubmodulesUpdateInitAct.triggered.connect(
1278 self.__gitSubmodulesUpdateInit) 1613 self.__gitSubmodulesUpdateInit
1614 )
1279 self.actions.append(self.gitSubmodulesUpdateInitAct) 1615 self.actions.append(self.gitSubmodulesUpdateInitAct)
1280 1616
1281 self.gitSubmodulesUpdateRemoteAct = EricAction( 1617 self.gitSubmodulesUpdateRemoteAct = EricAction(
1282 self.tr('Fetch and Update'), 1618 self.tr("Fetch and Update"),
1283 self.tr('Fetch and Update'), 1619 self.tr("Fetch and Update"),
1284 0, 0, self, 'git_submodules_update_remote') 1620 0,
1285 self.gitSubmodulesUpdateRemoteAct.setStatusTip(self.tr( 1621 0,
1286 'Fetch and update submodules of the current project' 1622 self,
1287 )) 1623 "git_submodules_update_remote",
1288 self.gitSubmodulesUpdateRemoteAct.setWhatsThis(self.tr( 1624 )
1289 """<b>Fetch and Update</b>""" 1625 self.gitSubmodulesUpdateRemoteAct.setStatusTip(
1290 """<p>This fetches and updates submodules of the current""" 1626 self.tr("Fetch and update submodules of the current project")
1291 """ project.</p>""" 1627 )
1292 )) 1628 self.gitSubmodulesUpdateRemoteAct.setWhatsThis(
1629 self.tr(
1630 """<b>Fetch and Update</b>"""
1631 """<p>This fetches and updates submodules of the current"""
1632 """ project.</p>"""
1633 )
1634 )
1293 self.gitSubmodulesUpdateRemoteAct.triggered.connect( 1635 self.gitSubmodulesUpdateRemoteAct.triggered.connect(
1294 self.__gitSubmodulesUpdateRemote) 1636 self.__gitSubmodulesUpdateRemote
1637 )
1295 self.actions.append(self.gitSubmodulesUpdateRemoteAct) 1638 self.actions.append(self.gitSubmodulesUpdateRemoteAct)
1296 1639
1297 self.gitSubmodulesUpdateOptionsAct = EricAction( 1640 self.gitSubmodulesUpdateOptionsAct = EricAction(
1298 self.tr('Update with Options'), 1641 self.tr("Update with Options"),
1299 self.tr('Update with Options'), 1642 self.tr("Update with Options"),
1300 0, 0, self, 'git_submodules_update_options') 1643 0,
1301 self.gitSubmodulesUpdateOptionsAct.setStatusTip(self.tr( 1644 0,
1302 'Update submodules of the current project offering a dialog' 1645 self,
1303 ' to enter options' 1646 "git_submodules_update_options",
1304 )) 1647 )
1305 self.gitSubmodulesUpdateOptionsAct.setWhatsThis(self.tr( 1648 self.gitSubmodulesUpdateOptionsAct.setStatusTip(
1306 """<b>Update with Options</b>""" 1649 self.tr(
1307 """<p>This updates submodules of the current project""" 1650 "Update submodules of the current project offering a dialog"
1308 """ offering a dialog to enter update options.</p>""" 1651 " to enter options"
1309 )) 1652 )
1653 )
1654 self.gitSubmodulesUpdateOptionsAct.setWhatsThis(
1655 self.tr(
1656 """<b>Update with Options</b>"""
1657 """<p>This updates submodules of the current project"""
1658 """ offering a dialog to enter update options.</p>"""
1659 )
1660 )
1310 self.gitSubmodulesUpdateOptionsAct.triggered.connect( 1661 self.gitSubmodulesUpdateOptionsAct.triggered.connect(
1311 self.__gitSubmodulesUpdateOptions) 1662 self.__gitSubmodulesUpdateOptions
1663 )
1312 self.actions.append(self.gitSubmodulesUpdateOptionsAct) 1664 self.actions.append(self.gitSubmodulesUpdateOptionsAct)
1313 1665
1314 self.gitSubmodulesSyncAct = EricAction( 1666 self.gitSubmodulesSyncAct = EricAction(
1315 self.tr('Synchronize URLs'), 1667 self.tr("Synchronize URLs"),
1316 self.tr('Synchronize URLs'), 1668 self.tr("Synchronize URLs"),
1317 0, 0, self, 'git_submodules_sync') 1669 0,
1318 self.gitSubmodulesSyncAct.setStatusTip(self.tr( 1670 0,
1319 'Synchronize URLs of submodules of the current project' 1671 self,
1320 )) 1672 "git_submodules_sync",
1321 self.gitSubmodulesSyncAct.setWhatsThis(self.tr( 1673 )
1322 """<b>Synchronize URLs</b>""" 1674 self.gitSubmodulesSyncAct.setStatusTip(
1323 """<p>This synchronizes URLs of submodules of the current""" 1675 self.tr("Synchronize URLs of submodules of the current project")
1324 """ project.</p>""" 1676 )
1325 )) 1677 self.gitSubmodulesSyncAct.setWhatsThis(
1326 self.gitSubmodulesSyncAct.triggered.connect( 1678 self.tr(
1327 self.__gitSubmodulesSync) 1679 """<b>Synchronize URLs</b>"""
1680 """<p>This synchronizes URLs of submodules of the current"""
1681 """ project.</p>"""
1682 )
1683 )
1684 self.gitSubmodulesSyncAct.triggered.connect(self.__gitSubmodulesSync)
1328 self.actions.append(self.gitSubmodulesSyncAct) 1685 self.actions.append(self.gitSubmodulesSyncAct)
1329 1686
1330 self.gitSubmodulesStatusAct = EricAction( 1687 self.gitSubmodulesStatusAct = EricAction(
1331 self.tr('Show Status'), 1688 self.tr("Show Status"),
1332 self.tr('Show Status'), 1689 self.tr("Show Status"),
1333 0, 0, self, 'git_submodules_status') 1690 0,
1334 self.gitSubmodulesStatusAct.setStatusTip(self.tr( 1691 0,
1335 'Show the status of submodules of the current project' 1692 self,
1336 )) 1693 "git_submodules_status",
1337 self.gitSubmodulesStatusAct.setWhatsThis(self.tr( 1694 )
1338 """<b>Show Status</b>""" 1695 self.gitSubmodulesStatusAct.setStatusTip(
1339 """<p>This shows a dialog with the status of submodules of the""" 1696 self.tr("Show the status of submodules of the current project")
1340 """ current project.</p>""" 1697 )
1341 )) 1698 self.gitSubmodulesStatusAct.setWhatsThis(
1342 self.gitSubmodulesStatusAct.triggered.connect( 1699 self.tr(
1343 self.__gitSubmodulesStatus) 1700 """<b>Show Status</b>"""
1701 """<p>This shows a dialog with the status of submodules of the"""
1702 """ current project.</p>"""
1703 )
1704 )
1705 self.gitSubmodulesStatusAct.triggered.connect(self.__gitSubmodulesStatus)
1344 self.actions.append(self.gitSubmodulesStatusAct) 1706 self.actions.append(self.gitSubmodulesStatusAct)
1345 1707
1346 self.gitSubmodulesSummaryAct = EricAction( 1708 self.gitSubmodulesSummaryAct = EricAction(
1347 self.tr('Show Summary'), 1709 self.tr("Show Summary"),
1348 self.tr('Show Summary'), 1710 self.tr("Show Summary"),
1349 0, 0, self, 'git_submodules_summary') 1711 0,
1350 self.gitSubmodulesSummaryAct.setStatusTip(self.tr( 1712 0,
1351 'Show summary information for submodules of the current project' 1713 self,
1352 )) 1714 "git_submodules_summary",
1353 self.gitSubmodulesSummaryAct.setWhatsThis(self.tr( 1715 )
1354 """<b>Show Summary</b>""" 1716 self.gitSubmodulesSummaryAct.setStatusTip(
1355 """<p>This shows some summary information for submodules of the""" 1717 self.tr("Show summary information for submodules of the current project")
1356 """ current project.</p>""" 1718 )
1357 )) 1719 self.gitSubmodulesSummaryAct.setWhatsThis(
1358 self.gitSubmodulesSummaryAct.triggered.connect( 1720 self.tr(
1359 self.__gitSubmodulesSummary) 1721 """<b>Show Summary</b>"""
1722 """<p>This shows some summary information for submodules of the"""
1723 """ current project.</p>"""
1724 )
1725 )
1726 self.gitSubmodulesSummaryAct.triggered.connect(self.__gitSubmodulesSummary)
1360 self.actions.append(self.gitSubmodulesSummaryAct) 1727 self.actions.append(self.gitSubmodulesSummaryAct)
1361 1728
1362 def initMenu(self, menu): 1729 def initMenu(self, menu):
1363 """ 1730 """
1364 Public method to generate the VCS menu. 1731 Public method to generate the VCS menu.
1365 1732
1366 @param menu reference to the menu to be populated (QMenu) 1733 @param menu reference to the menu to be populated (QMenu)
1367 """ 1734 """
1368 menu.clear() 1735 menu.clear()
1369 1736
1370 self.subMenus = [] 1737 self.subMenus = []
1371 1738
1372 adminMenu = QMenu(self.tr("Administration"), menu) 1739 adminMenu = QMenu(self.tr("Administration"), menu)
1373 adminMenu.setTearOffEnabled(True) 1740 adminMenu.setTearOffEnabled(True)
1374 adminMenu.addAction(self.gitShowConfigAct) 1741 adminMenu.addAction(self.gitShowConfigAct)
1375 adminMenu.addAction(self.gitRepoConfigAct) 1742 adminMenu.addAction(self.gitRepoConfigAct)
1376 adminMenu.addSeparator() 1743 adminMenu.addSeparator()
1382 adminMenu.addSeparator() 1749 adminMenu.addSeparator()
1383 adminMenu.addAction(self.gitStatisticsAct) 1750 adminMenu.addAction(self.gitStatisticsAct)
1384 adminMenu.addAction(self.gitVerifyAct) 1751 adminMenu.addAction(self.gitVerifyAct)
1385 adminMenu.addAction(self.gitHouseKeepingAct) 1752 adminMenu.addAction(self.gitHouseKeepingAct)
1386 self.subMenus.append(adminMenu) 1753 self.subMenus.append(adminMenu)
1387 1754
1388 bundleMenu = QMenu(self.tr("Bundle Management"), menu) 1755 bundleMenu = QMenu(self.tr("Bundle Management"), menu)
1389 bundleMenu.setTearOffEnabled(True) 1756 bundleMenu.setTearOffEnabled(True)
1390 bundleMenu.addAction(self.gitBundleAct) 1757 bundleMenu.addAction(self.gitBundleAct)
1391 bundleMenu.addSeparator() 1758 bundleMenu.addSeparator()
1392 bundleMenu.addAction(self.gitBundleVerifyAct) 1759 bundleMenu.addAction(self.gitBundleVerifyAct)
1393 bundleMenu.addAction(self.gitBundleListHeadsAct) 1760 bundleMenu.addAction(self.gitBundleListHeadsAct)
1394 bundleMenu.addSeparator() 1761 bundleMenu.addSeparator()
1395 bundleMenu.addAction(self.gitBundleApplyFetchAct) 1762 bundleMenu.addAction(self.gitBundleApplyFetchAct)
1396 bundleMenu.addAction(self.gitBundleApplyPullAct) 1763 bundleMenu.addAction(self.gitBundleApplyPullAct)
1397 self.subMenus.append(bundleMenu) 1764 self.subMenus.append(bundleMenu)
1398 1765
1399 patchMenu = QMenu(self.tr("Patch Management"), menu) 1766 patchMenu = QMenu(self.tr("Patch Management"), menu)
1400 patchMenu.setTearOffEnabled(True) 1767 patchMenu.setTearOffEnabled(True)
1401 patchMenu.addAction(self.gitCheckPatchesAct) 1768 patchMenu.addAction(self.gitCheckPatchesAct)
1402 patchMenu.addAction(self.gitApplyPatchesAct) 1769 patchMenu.addAction(self.gitApplyPatchesAct)
1403 patchMenu.addSeparator() 1770 patchMenu.addSeparator()
1404 patchMenu.addAction(self.gitShowPatcheStatisticsAct) 1771 patchMenu.addAction(self.gitShowPatcheStatisticsAct)
1405 self.subMenus.append(patchMenu) 1772 self.subMenus.append(patchMenu)
1406 1773
1407 bisectMenu = QMenu(self.tr("Bisect"), menu) 1774 bisectMenu = QMenu(self.tr("Bisect"), menu)
1408 bisectMenu.setTearOffEnabled(True) 1775 bisectMenu.setTearOffEnabled(True)
1409 bisectMenu.addAction(self.gitBisectStartAct) 1776 bisectMenu.addAction(self.gitBisectStartAct)
1410 bisectMenu.addAction(self.gitBisectStartExtendedAct) 1777 bisectMenu.addAction(self.gitBisectStartExtendedAct)
1411 bisectMenu.addSeparator() 1778 bisectMenu.addSeparator()
1419 bisectMenu.addSeparator() 1786 bisectMenu.addSeparator()
1420 bisectMenu.addAction(self.gitBisectCreateReplayAct) 1787 bisectMenu.addAction(self.gitBisectCreateReplayAct)
1421 bisectMenu.addAction(self.gitBisectEditReplayAct) 1788 bisectMenu.addAction(self.gitBisectEditReplayAct)
1422 bisectMenu.addAction(self.gitBisectReplayAct) 1789 bisectMenu.addAction(self.gitBisectReplayAct)
1423 self.subMenus.append(bisectMenu) 1790 self.subMenus.append(bisectMenu)
1424 1791
1425 tagsMenu = QMenu(self.tr("Tags"), menu) 1792 tagsMenu = QMenu(self.tr("Tags"), menu)
1426 tagsMenu.setIcon(UI.PixmapCache.getIcon("vcsTag")) 1793 tagsMenu.setIcon(UI.PixmapCache.getIcon("vcsTag"))
1427 tagsMenu.setTearOffEnabled(True) 1794 tagsMenu.setTearOffEnabled(True)
1428 tagsMenu.addAction(self.vcsTagAct) 1795 tagsMenu.addAction(self.vcsTagAct)
1429 tagsMenu.addAction(self.gitTagListAct) 1796 tagsMenu.addAction(self.gitTagListAct)
1430 tagsMenu.addAction(self.gitDescribeTagAct) 1797 tagsMenu.addAction(self.gitDescribeTagAct)
1431 self.subMenus.append(tagsMenu) 1798 self.subMenus.append(tagsMenu)
1432 1799
1433 branchesMenu = QMenu(self.tr("Branches"), menu) 1800 branchesMenu = QMenu(self.tr("Branches"), menu)
1434 branchesMenu.setIcon(UI.PixmapCache.getIcon("vcsBranch")) 1801 branchesMenu.setIcon(UI.PixmapCache.getIcon("vcsBranch"))
1435 branchesMenu.setTearOffEnabled(True) 1802 branchesMenu.setTearOffEnabled(True)
1436 branchesMenu.addAction(self.gitBranchAct) 1803 branchesMenu.addAction(self.gitBranchAct)
1437 branchesMenu.addSeparator() 1804 branchesMenu.addSeparator()
1440 branchesMenu.addAction(self.gitNotMergedBranchListAct) 1807 branchesMenu.addAction(self.gitNotMergedBranchListAct)
1441 branchesMenu.addAction(self.gitShowBranchAct) 1808 branchesMenu.addAction(self.gitShowBranchAct)
1442 branchesMenu.addSeparator() 1809 branchesMenu.addSeparator()
1443 branchesMenu.addAction(self.gitDeleteRemoteBranchAct) 1810 branchesMenu.addAction(self.gitDeleteRemoteBranchAct)
1444 self.subMenus.append(branchesMenu) 1811 self.subMenus.append(branchesMenu)
1445 1812
1446 changesMenu = QMenu(self.tr("Manage Changes"), menu) 1813 changesMenu = QMenu(self.tr("Manage Changes"), menu)
1447 changesMenu.setTearOffEnabled(True) 1814 changesMenu.setTearOffEnabled(True)
1448 changesMenu.addAction(self.gitUnstageAct) 1815 changesMenu.addAction(self.gitUnstageAct)
1449 changesMenu.addAction(self.vcsRevertAct) 1816 changesMenu.addAction(self.vcsRevertAct)
1450 changesMenu.addAction(self.vcsMergeAct) 1817 changesMenu.addAction(self.vcsMergeAct)
1451 changesMenu.addAction(self.gitCommitMergeAct) 1818 changesMenu.addAction(self.gitCommitMergeAct)
1452 changesMenu.addAction(self.gitCancelMergeAct) 1819 changesMenu.addAction(self.gitCancelMergeAct)
1453 1820
1454 remotesMenu = QMenu(self.tr("Remote Repositories"), menu) 1821 remotesMenu = QMenu(self.tr("Remote Repositories"), menu)
1455 remotesMenu.setTearOffEnabled(True) 1822 remotesMenu.setTearOffEnabled(True)
1456 remotesMenu.addAction(self.gitRemotesShowAct) 1823 remotesMenu.addAction(self.gitRemotesShowAct)
1457 remotesMenu.addAction(self.gitRemoteShowAct) 1824 remotesMenu.addAction(self.gitRemoteShowAct)
1458 remotesMenu.addSeparator() 1825 remotesMenu.addSeparator()
1460 remotesMenu.addAction(self.gitRemoteRenameAct) 1827 remotesMenu.addAction(self.gitRemoteRenameAct)
1461 remotesMenu.addAction(self.gitRemoteChangeUrlAct) 1828 remotesMenu.addAction(self.gitRemoteChangeUrlAct)
1462 remotesMenu.addAction(self.gitRemoteCredentialsAct) 1829 remotesMenu.addAction(self.gitRemoteCredentialsAct)
1463 remotesMenu.addAction(self.gitRemoteRemoveAct) 1830 remotesMenu.addAction(self.gitRemoteRemoveAct)
1464 remotesMenu.addAction(self.gitRemotePruneAct) 1831 remotesMenu.addAction(self.gitRemotePruneAct)
1465 1832
1466 cherrypickMenu = QMenu(self.tr("Cherry-pick"), menu) 1833 cherrypickMenu = QMenu(self.tr("Cherry-pick"), menu)
1467 cherrypickMenu.setIcon(UI.PixmapCache.getIcon("vcsGraft")) 1834 cherrypickMenu.setIcon(UI.PixmapCache.getIcon("vcsGraft"))
1468 cherrypickMenu.setTearOffEnabled(True) 1835 cherrypickMenu.setTearOffEnabled(True)
1469 cherrypickMenu.addAction(self.gitCherryPickAct) 1836 cherrypickMenu.addAction(self.gitCherryPickAct)
1470 cherrypickMenu.addAction(self.gitCherryPickContinueAct) 1837 cherrypickMenu.addAction(self.gitCherryPickContinueAct)
1471 cherrypickMenu.addAction(self.gitCherryPickQuitAct) 1838 cherrypickMenu.addAction(self.gitCherryPickQuitAct)
1472 cherrypickMenu.addAction(self.gitCherryPickAbortAct) 1839 cherrypickMenu.addAction(self.gitCherryPickAbortAct)
1473 1840
1474 stashMenu = QMenu(self.tr("Stash"), menu) 1841 stashMenu = QMenu(self.tr("Stash"), menu)
1475 stashMenu.setTearOffEnabled(True) 1842 stashMenu.setTearOffEnabled(True)
1476 stashMenu.addAction(self.gitStashAct) 1843 stashMenu.addAction(self.gitStashAct)
1477 stashMenu.addSeparator() 1844 stashMenu.addSeparator()
1478 stashMenu.addAction(self.gitStashBrowserAct) 1845 stashMenu.addAction(self.gitStashBrowserAct)
1483 stashMenu.addSeparator() 1850 stashMenu.addSeparator()
1484 stashMenu.addAction(self.gitStashBranchAct) 1851 stashMenu.addAction(self.gitStashBranchAct)
1485 stashMenu.addSeparator() 1852 stashMenu.addSeparator()
1486 stashMenu.addAction(self.gitStashDropAct) 1853 stashMenu.addAction(self.gitStashDropAct)
1487 stashMenu.addAction(self.gitStashClearAct) 1854 stashMenu.addAction(self.gitStashClearAct)
1488 1855
1489 submodulesMenu = QMenu(self.tr("Submodules"), menu) 1856 submodulesMenu = QMenu(self.tr("Submodules"), menu)
1490 submodulesMenu.setTearOffEnabled(True) 1857 submodulesMenu.setTearOffEnabled(True)
1491 submodulesMenu.addAction(self.gitSubmoduleAddAct) 1858 submodulesMenu.addAction(self.gitSubmoduleAddAct)
1492 submodulesMenu.addSeparator() 1859 submodulesMenu.addSeparator()
1493 submodulesMenu.addAction(self.gitSubmodulesInitAct) 1860 submodulesMenu.addAction(self.gitSubmodulesInitAct)
1502 submodulesMenu.addSeparator() 1869 submodulesMenu.addSeparator()
1503 submodulesMenu.addAction(self.gitSubmodulesListAct) 1870 submodulesMenu.addAction(self.gitSubmodulesListAct)
1504 submodulesMenu.addSeparator() 1871 submodulesMenu.addSeparator()
1505 submodulesMenu.addAction(self.gitSubmodulesStatusAct) 1872 submodulesMenu.addAction(self.gitSubmodulesStatusAct)
1506 submodulesMenu.addAction(self.gitSubmodulesSummaryAct) 1873 submodulesMenu.addAction(self.gitSubmodulesSummaryAct)
1507 1874
1508 act = menu.addAction( 1875 act = menu.addAction(
1509 UI.PixmapCache.getIcon( 1876 UI.PixmapCache.getIcon(
1510 os.path.join("VcsPlugins", "vcsGit", "icons", "git.svg")), 1877 os.path.join("VcsPlugins", "vcsGit", "icons", "git.svg")
1511 self.vcs.vcsName(), self._vcsInfoDisplay) 1878 ),
1879 self.vcs.vcsName(),
1880 self._vcsInfoDisplay,
1881 )
1512 font = act.font() 1882 font = act.font()
1513 font.setBold(True) 1883 font.setBold(True)
1514 act.setFont(font) 1884 act.setFont(font)
1515 menu.addSeparator() 1885 menu.addSeparator()
1516 1886
1517 menu.addAction(self.gitFetchAct) 1887 menu.addAction(self.gitFetchAct)
1518 menu.addAction(self.gitPullAct) 1888 menu.addAction(self.gitPullAct)
1519 menu.addSeparator() 1889 menu.addSeparator()
1520 menu.addAction(self.vcsCommitAct) 1890 menu.addAction(self.vcsCommitAct)
1521 menu.addAction(self.gitPushAct) 1891 menu.addAction(self.gitPushAct)
1554 menu.addAction(self.gitEditUserConfigAct) 1924 menu.addAction(self.gitEditUserConfigAct)
1555 menu.addAction(self.gitConfigAct) 1925 menu.addAction(self.gitConfigAct)
1556 menu.addSeparator() 1926 menu.addSeparator()
1557 menu.addAction(self.vcsNewAct) 1927 menu.addAction(self.vcsNewAct)
1558 menu.addAction(self.vcsExportAct) 1928 menu.addAction(self.vcsExportAct)
1559 1929
1560 def initToolbar(self, ui, toolbarManager): 1930 def initToolbar(self, ui, toolbarManager):
1561 """ 1931 """
1562 Public slot to initialize the VCS toolbar. 1932 Public slot to initialize the VCS toolbar.
1563 1933
1564 @param ui reference to the main window (UserInterface) 1934 @param ui reference to the main window (UserInterface)
1565 @param toolbarManager reference to a toolbar manager object 1935 @param toolbarManager reference to a toolbar manager object
1566 (EricToolBarManager) 1936 (EricToolBarManager)
1567 """ 1937 """
1568 self.__toolbar = QToolBar(self.tr("Git"), ui) 1938 self.__toolbar = QToolBar(self.tr("Git"), ui)
1569 self.__toolbar.setIconSize(UI.Config.ToolBarIconSize) 1939 self.__toolbar.setIconSize(UI.Config.ToolBarIconSize)
1570 self.__toolbar.setObjectName("GitToolbar") 1940 self.__toolbar.setObjectName("GitToolbar")
1571 self.__toolbar.setToolTip(self.tr('Git')) 1941 self.__toolbar.setToolTip(self.tr("Git"))
1572 1942
1573 self.__toolbar.addAction(self.gitLogBrowserAct) 1943 self.__toolbar.addAction(self.gitLogBrowserAct)
1574 self.__toolbar.addAction(self.vcsStatusAct) 1944 self.__toolbar.addAction(self.vcsStatusAct)
1575 self.__toolbar.addSeparator() 1945 self.__toolbar.addSeparator()
1576 self.__toolbar.addAction(self.vcsDiffAct) 1946 self.__toolbar.addAction(self.vcsDiffAct)
1577 self.__toolbar.addSeparator() 1947 self.__toolbar.addSeparator()
1578 self.__toolbar.addAction(self.vcsNewAct) 1948 self.__toolbar.addAction(self.vcsNewAct)
1579 self.__toolbar.addAction(self.vcsExportAct) 1949 self.__toolbar.addAction(self.vcsExportAct)
1580 self.__toolbar.addSeparator() 1950 self.__toolbar.addSeparator()
1581 1951
1582 title = self.__toolbar.windowTitle() 1952 title = self.__toolbar.windowTitle()
1583 toolbarManager.addToolBar(self.__toolbar, title) 1953 toolbarManager.addToolBar(self.__toolbar, title)
1584 toolbarManager.addAction(self.gitFetchAct, title) 1954 toolbarManager.addAction(self.gitFetchAct, title)
1585 toolbarManager.addAction(self.gitPullAct, title) 1955 toolbarManager.addAction(self.gitPullAct, title)
1586 toolbarManager.addAction(self.vcsCommitAct, title) 1956 toolbarManager.addAction(self.vcsCommitAct, title)
1593 toolbarManager.addAction(self.vcsRevertAct, title) 1963 toolbarManager.addAction(self.vcsRevertAct, title)
1594 toolbarManager.addAction(self.gitUnstageAct, title) 1964 toolbarManager.addAction(self.gitUnstageAct, title)
1595 toolbarManager.addAction(self.vcsMergeAct, title) 1965 toolbarManager.addAction(self.vcsMergeAct, title)
1596 toolbarManager.addAction(self.gitCherryPickAct, title) 1966 toolbarManager.addAction(self.gitCherryPickAct, title)
1597 toolbarManager.addAction(self.gitBisectLogBrowserAct, title) 1967 toolbarManager.addAction(self.gitBisectLogBrowserAct, title)
1598 1968
1599 self.__toolbar.setEnabled(False) 1969 self.__toolbar.setEnabled(False)
1600 self.__toolbar.setVisible(False) 1970 self.__toolbar.setVisible(False)
1601 1971
1602 ui.registerToolbar("git", self.__toolbar.windowTitle(), 1972 ui.registerToolbar("git", self.__toolbar.windowTitle(), self.__toolbar, "vcs")
1603 self.__toolbar, "vcs")
1604 ui.addToolBar(self.__toolbar) 1973 ui.addToolBar(self.__toolbar)
1605 1974
1606 def removeToolbar(self, ui, toolbarManager): 1975 def removeToolbar(self, ui, toolbarManager):
1607 """ 1976 """
1608 Public method to remove a toolbar created by initToolbar(). 1977 Public method to remove a toolbar created by initToolbar().
1609 1978
1610 @param ui reference to the main window (UserInterface) 1979 @param ui reference to the main window (UserInterface)
1611 @param toolbarManager reference to a toolbar manager object 1980 @param toolbarManager reference to a toolbar manager object
1612 (EricToolBarManager) 1981 (EricToolBarManager)
1613 """ 1982 """
1614 ui.removeToolBar(self.__toolbar) 1983 ui.removeToolBar(self.__toolbar)
1615 ui.unregisterToolbar("git") 1984 ui.unregisterToolbar("git")
1616 1985
1617 title = self.__toolbar.windowTitle() 1986 title = self.__toolbar.windowTitle()
1618 toolbarManager.removeCategoryActions(title) 1987 toolbarManager.removeCategoryActions(title)
1619 toolbarManager.removeToolBar(self.__toolbar) 1988 toolbarManager.removeToolBar(self.__toolbar)
1620 1989
1621 self.__toolbar.deleteLater() 1990 self.__toolbar.deleteLater()
1622 self.__toolbar = None 1991 self.__toolbar = None
1623 1992
1624 def shutdown(self): 1993 def shutdown(self):
1625 """ 1994 """
1626 Public method to perform shutdown actions. 1995 Public method to perform shutdown actions.
1627 """ 1996 """
1628 # close torn off sub menus 1997 # close torn off sub menus
1629 for menu in self.subMenus: 1998 for menu in self.subMenus:
1630 if menu.isTearOffMenuVisible(): 1999 if menu.isTearOffMenuVisible():
1631 menu.hideTearOffMenu() 2000 menu.hideTearOffMenu()
1632 2001
1633 def __gitTagList(self): 2002 def __gitTagList(self):
1634 """ 2003 """
1635 Private slot used to list the tags of the project. 2004 Private slot used to list the tags of the project.
1636 """ 2005 """
1637 self.vcs.gitListTagBranch(self.project.getProjectPath(), True) 2006 self.vcs.gitListTagBranch(self.project.getProjectPath(), True)
1638 2007
1639 def __gitDescribeTag(self): 2008 def __gitDescribeTag(self):
1640 """ 2009 """
1641 Private slot to show the most recent tag. 2010 Private slot to show the most recent tag.
1642 """ 2011 """
1643 self.vcs.gitDescribe(self.project.getProjectPath(), []) 2012 self.vcs.gitDescribe(self.project.getProjectPath(), [])
1644 2013
1645 def __gitBranchList(self): 2014 def __gitBranchList(self):
1646 """ 2015 """
1647 Private slot used to list the branches of the project. 2016 Private slot used to list the branches of the project.
1648 """ 2017 """
1649 self.vcs.gitListTagBranch(self.project.getProjectPath(), False) 2018 self.vcs.gitListTagBranch(self.project.getProjectPath(), False)
1650 2019
1651 def __gitMergedBranchList(self): 2020 def __gitMergedBranchList(self):
1652 """ 2021 """
1653 Private slot used to list the merged branches of the project. 2022 Private slot used to list the merged branches of the project.
1654 """ 2023 """
1655 self.vcs.gitListTagBranch(self.project.getProjectPath(), False, 2024 self.vcs.gitListTagBranch(
1656 listAll=False, merged=True) 2025 self.project.getProjectPath(), False, listAll=False, merged=True
1657 2026 )
2027
1658 def __gitNotMergedBranchList(self): 2028 def __gitNotMergedBranchList(self):
1659 """ 2029 """
1660 Private slot used to list the not merged branches of the project. 2030 Private slot used to list the not merged branches of the project.
1661 """ 2031 """
1662 self.vcs.gitListTagBranch(self.project.getProjectPath(), False, 2032 self.vcs.gitListTagBranch(
1663 listAll=False, merged=False) 2033 self.project.getProjectPath(), False, listAll=False, merged=False
1664 2034 )
2035
1665 def __gitBranch(self): 2036 def __gitBranch(self):
1666 """ 2037 """
1667 Private slot used to perform branch operations for the project. 2038 Private slot used to perform branch operations for the project.
1668 """ 2039 """
1669 pfile = pathlib.Path(self.project.getProjectFile()) 2040 pfile = pathlib.Path(self.project.getProjectFile())
1670 lastModified = pfile.stat().st_mtime 2041 lastModified = pfile.stat().st_mtime
1671 shouldReopen = ( 2042 shouldReopen = (
1672 self.vcs.gitBranch(self.project.getProjectPath())[1] or 2043 self.vcs.gitBranch(self.project.getProjectPath())[1]
1673 pfile.stat().st_mtime != lastModified 2044 or pfile.stat().st_mtime != lastModified
1674 ) 2045 )
1675 if shouldReopen: 2046 if shouldReopen:
1676 res = EricMessageBox.yesNo( 2047 res = EricMessageBox.yesNo(
1677 self.parent(), 2048 self.parent(),
1678 self.tr("Branch"), 2049 self.tr("Branch"),
1679 self.tr("""The project should be reread. Do this now?"""), 2050 self.tr("""The project should be reread. Do this now?"""),
1680 yesDefault=True) 2051 yesDefault=True,
2052 )
1681 if res: 2053 if res:
1682 self.project.reopenProject() 2054 self.project.reopenProject()
1683 2055
1684 def __gitDeleteBranch(self): 2056 def __gitDeleteBranch(self):
1685 """ 2057 """
1686 Private slot used to delete a branch from a remote repository. 2058 Private slot used to delete a branch from a remote repository.
1687 """ 2059 """
1688 self.vcs.gitDeleteRemoteBranch(self.project.getProjectPath()) 2060 self.vcs.gitDeleteRemoteBranch(self.project.getProjectPath())
1689 2061
1690 def __gitShowBranch(self): 2062 def __gitShowBranch(self):
1691 """ 2063 """
1692 Private slot used to show the current branch for the project. 2064 Private slot used to show the current branch for the project.
1693 """ 2065 """
1694 self.vcs.gitShowBranch(self.project.getProjectPath()) 2066 self.vcs.gitShowBranch(self.project.getProjectPath())
1695 2067
1696 def __gitExtendedDiff(self): 2068 def __gitExtendedDiff(self):
1697 """ 2069 """
1698 Private slot used to perform a git diff with the selection of 2070 Private slot used to perform a git diff with the selection of
1699 revisions. 2071 revisions.
1700 """ 2072 """
1701 self.vcs.gitExtendedDiff(self.project.getProjectPath()) 2073 self.vcs.gitExtendedDiff(self.project.getProjectPath())
1702 2074
1703 def __gitFetch(self): 2075 def __gitFetch(self):
1704 """ 2076 """
1705 Private slot used to fetch changes from a remote repository. 2077 Private slot used to fetch changes from a remote repository.
1706 """ 2078 """
1707 self.vcs.gitFetch(self.project.getProjectPath()) 2079 self.vcs.gitFetch(self.project.getProjectPath())
1708 2080
1709 def __gitPull(self): 2081 def __gitPull(self):
1710 """ 2082 """
1711 Private slot used to pull changes from a remote repository. 2083 Private slot used to pull changes from a remote repository.
1712 """ 2084 """
1713 pfile = pathlib.Path(self.project.getProjectFile()) 2085 pfile = pathlib.Path(self.project.getProjectFile())
1714 lastModified = pfile.stat().st_mtime 2086 lastModified = pfile.stat().st_mtime
1715 shouldReopen = ( 2087 shouldReopen = (
1716 self.vcs.gitPull(self.project.getProjectPath()) or 2088 self.vcs.gitPull(self.project.getProjectPath())
1717 pfile.stat().st_mtime != lastModified 2089 or pfile.stat().st_mtime != lastModified
1718 ) 2090 )
1719 if shouldReopen: 2091 if shouldReopen:
1720 res = EricMessageBox.yesNo( 2092 res = EricMessageBox.yesNo(
1721 self.parent(), 2093 self.parent(),
1722 self.tr("Pull"), 2094 self.tr("Pull"),
1723 self.tr("""The project should be reread. Do this now?"""), 2095 self.tr("""The project should be reread. Do this now?"""),
1724 yesDefault=True) 2096 yesDefault=True,
2097 )
1725 if res: 2098 if res:
1726 self.project.reopenProject() 2099 self.project.reopenProject()
1727 2100
1728 def __gitPush(self): 2101 def __gitPush(self):
1729 """ 2102 """
1730 Private slot used to push changes to a remote repository. 2103 Private slot used to push changes to a remote repository.
1731 """ 2104 """
1732 self.vcs.gitPush(self.project.getProjectPath()) 2105 self.vcs.gitPush(self.project.getProjectPath())
1733 2106
1734 def __gitRevert(self): 2107 def __gitRevert(self):
1735 """ 2108 """
1736 Private slot used to revert changes made to the local project. 2109 Private slot used to revert changes made to the local project.
1737 """ 2110 """
1738 pfile = pathlib.Path(self.project.getProjectFile()) 2111 pfile = pathlib.Path(self.project.getProjectFile())
1739 lastModified = pfile.stat().st_mtime 2112 lastModified = pfile.stat().st_mtime
1740 shouldReopen = ( 2113 shouldReopen = (
1741 self.vcs.vcsRevert(self.project.getProjectPath()) or 2114 self.vcs.vcsRevert(self.project.getProjectPath())
1742 pfile.stat().st_mtime != lastModified 2115 or pfile.stat().st_mtime != lastModified
1743 ) 2116 )
1744 if shouldReopen: 2117 if shouldReopen:
1745 res = EricMessageBox.yesNo( 2118 res = EricMessageBox.yesNo(
1746 self.parent(), 2119 self.parent(),
1747 self.tr("Revert Changes"), 2120 self.tr("Revert Changes"),
1748 self.tr("""The project should be reread. Do this now?"""), 2121 self.tr("""The project should be reread. Do this now?"""),
1749 yesDefault=True) 2122 yesDefault=True,
2123 )
1750 if res: 2124 if res:
1751 self.project.reopenProject() 2125 self.project.reopenProject()
1752 2126
1753 def __gitUnstage(self): 2127 def __gitUnstage(self):
1754 """ 2128 """
1755 Private slot used to unstage changes made to the local project. 2129 Private slot used to unstage changes made to the local project.
1756 """ 2130 """
1757 pfile = pathlib.Path(self.project.getProjectFile()) 2131 pfile = pathlib.Path(self.project.getProjectFile())
1758 lastModified = pfile.stat().st_mtime 2132 lastModified = pfile.stat().st_mtime
1759 shouldReopen = ( 2133 shouldReopen = (
1760 self.vcs.gitUnstage(self.project.getProjectPath()) or 2134 self.vcs.gitUnstage(self.project.getProjectPath())
1761 pfile.stat().st_mtime != lastModified 2135 or pfile.stat().st_mtime != lastModified
1762 ) 2136 )
1763 if shouldReopen: 2137 if shouldReopen:
1764 res = EricMessageBox.yesNo( 2138 res = EricMessageBox.yesNo(
1765 self.parent(), 2139 self.parent(),
1766 self.tr("Unstage Changes"), 2140 self.tr("Unstage Changes"),
1767 self.tr("""The project should be reread. Do this now?"""), 2141 self.tr("""The project should be reread. Do this now?"""),
1768 yesDefault=True) 2142 yesDefault=True,
2143 )
1769 if res: 2144 if res:
1770 self.project.reopenProject() 2145 self.project.reopenProject()
1771 2146
1772 def __gitCancelMerge(self): 2147 def __gitCancelMerge(self):
1773 """ 2148 """
1774 Private slot used to cancel an uncommitted or failed merge. 2149 Private slot used to cancel an uncommitted or failed merge.
1775 """ 2150 """
1776 self.vcs.gitCancelMerge(self.project.getProjectPath()) 2151 self.vcs.gitCancelMerge(self.project.getProjectPath())
1777 2152
1778 def __gitCommitMerge(self): 2153 def __gitCommitMerge(self):
1779 """ 2154 """
1780 Private slot used to commit the ongoing merge. 2155 Private slot used to commit the ongoing merge.
1781 """ 2156 """
1782 self.vcs.gitCommitMerge(self.project.getProjectPath()) 2157 self.vcs.gitCommitMerge(self.project.getProjectPath())
1783 2158
1784 def __gitShowRemotes(self): 2159 def __gitShowRemotes(self):
1785 """ 2160 """
1786 Private slot used to show the available remote repositories. 2161 Private slot used to show the available remote repositories.
1787 """ 2162 """
1788 self.vcs.gitShowRemotes(self.project.getProjectPath()) 2163 self.vcs.gitShowRemotes(self.project.getProjectPath())
1789 2164
1790 def __gitShowRemote(self): 2165 def __gitShowRemote(self):
1791 """ 2166 """
1792 Private slot used to show information about a remote repository. 2167 Private slot used to show information about a remote repository.
1793 """ 2168 """
1794 remotes = self.vcs.gitGetRemotesList(self.project.getProjectPath()) 2169 remotes = self.vcs.gitGetRemotesList(self.project.getProjectPath())
1795 remote, ok = QInputDialog.getItem( 2170 remote, ok = QInputDialog.getItem(
1796 None, 2171 None,
1797 self.tr("Show Remote Info"), 2172 self.tr("Show Remote Info"),
1798 self.tr("Select a remote repository:"), 2173 self.tr("Select a remote repository:"),
1799 remotes, 2174 remotes,
1800 0, False) 2175 0,
2176 False,
2177 )
1801 if ok: 2178 if ok:
1802 self.vcs.gitShowRemote(self.project.getProjectPath(), remote) 2179 self.vcs.gitShowRemote(self.project.getProjectPath(), remote)
1803 2180
1804 def __gitAddRemote(self): 2181 def __gitAddRemote(self):
1805 """ 2182 """
1806 Private slot to add a remote repository. 2183 Private slot to add a remote repository.
1807 """ 2184 """
1808 self.vcs.gitAddRemote(self.project.getProjectPath()) 2185 self.vcs.gitAddRemote(self.project.getProjectPath())
1809 2186
1810 def __gitRemoveRemote(self): 2187 def __gitRemoveRemote(self):
1811 """ 2188 """
1812 Private slot to remove a remote repository. 2189 Private slot to remove a remote repository.
1813 """ 2190 """
1814 remotes = self.vcs.gitGetRemotesList(self.project.getProjectPath()) 2191 remotes = self.vcs.gitGetRemotesList(self.project.getProjectPath())
1815 remote, ok = QInputDialog.getItem( 2192 remote, ok = QInputDialog.getItem(
1816 None, 2193 None,
1817 self.tr("Remove"), 2194 self.tr("Remove"),
1818 self.tr("Select a remote repository:"), 2195 self.tr("Select a remote repository:"),
1819 remotes, 2196 remotes,
1820 0, False) 2197 0,
2198 False,
2199 )
1821 if ok: 2200 if ok:
1822 self.vcs.gitRemoveRemote(self.project.getProjectPath(), remote) 2201 self.vcs.gitRemoveRemote(self.project.getProjectPath(), remote)
1823 2202
1824 def __gitPruneRemote(self): 2203 def __gitPruneRemote(self):
1825 """ 2204 """
1826 Private slot to prune stale tracking branches of a remote repository. 2205 Private slot to prune stale tracking branches of a remote repository.
1827 """ 2206 """
1828 remotes = self.vcs.gitGetRemotesList(self.project.getProjectPath()) 2207 remotes = self.vcs.gitGetRemotesList(self.project.getProjectPath())
1829 remote, ok = QInputDialog.getItem( 2208 remote, ok = QInputDialog.getItem(
1830 None, 2209 None,
1831 self.tr("Prune"), 2210 self.tr("Prune"),
1832 self.tr("Select a remote repository:"), 2211 self.tr("Select a remote repository:"),
1833 remotes, 2212 remotes,
1834 0, False) 2213 0,
2214 False,
2215 )
1835 if ok: 2216 if ok:
1836 self.vcs.gitPruneRemote(self.project.getProjectPath(), remote) 2217 self.vcs.gitPruneRemote(self.project.getProjectPath(), remote)
1837 2218
1838 def __gitRenameRemote(self): 2219 def __gitRenameRemote(self):
1839 """ 2220 """
1840 Private slot to rename a remote repository. 2221 Private slot to rename a remote repository.
1841 """ 2222 """
1842 remotes = self.vcs.gitGetRemotesList(self.project.getProjectPath()) 2223 remotes = self.vcs.gitGetRemotesList(self.project.getProjectPath())
1843 remote, ok = QInputDialog.getItem( 2224 remote, ok = QInputDialog.getItem(
1844 None, 2225 None,
1845 self.tr("Rename"), 2226 self.tr("Rename"),
1846 self.tr("Select a remote repository:"), 2227 self.tr("Select a remote repository:"),
1847 remotes, 2228 remotes,
1848 0, False) 2229 0,
2230 False,
2231 )
1849 if ok: 2232 if ok:
1850 self.vcs.gitRenameRemote(self.project.getProjectPath(), remote) 2233 self.vcs.gitRenameRemote(self.project.getProjectPath(), remote)
1851 2234
1852 def __gitChangeRemoteUrl(self): 2235 def __gitChangeRemoteUrl(self):
1853 """ 2236 """
1854 Private slot to change the URL of a remote repository. 2237 Private slot to change the URL of a remote repository.
1855 """ 2238 """
1856 remotes = self.vcs.gitGetRemotesList(self.project.getProjectPath()) 2239 remotes = self.vcs.gitGetRemotesList(self.project.getProjectPath())
1857 remote, ok = QInputDialog.getItem( 2240 remote, ok = QInputDialog.getItem(
1858 None, 2241 None,
1859 self.tr("Rename"), 2242 self.tr("Rename"),
1860 self.tr("Select a remote repository:"), 2243 self.tr("Select a remote repository:"),
1861 remotes, 2244 remotes,
1862 0, False) 2245 0,
2246 False,
2247 )
1863 if ok: 2248 if ok:
1864 self.vcs.gitChangeRemoteUrl(self.project.getProjectPath(), remote) 2249 self.vcs.gitChangeRemoteUrl(self.project.getProjectPath(), remote)
1865 2250
1866 def __gitRemoteCredentials(self): 2251 def __gitRemoteCredentials(self):
1867 """ 2252 """
1868 Private slot to change or set the user credentials for a remote 2253 Private slot to change or set the user credentials for a remote
1869 repository. 2254 repository.
1870 """ 2255 """
1872 remote, ok = QInputDialog.getItem( 2257 remote, ok = QInputDialog.getItem(
1873 None, 2258 None,
1874 self.tr("Rename"), 2259 self.tr("Rename"),
1875 self.tr("Select a remote repository:"), 2260 self.tr("Select a remote repository:"),
1876 remotes, 2261 remotes,
1877 0, False) 2262 0,
2263 False,
2264 )
1878 if ok: 2265 if ok:
1879 self.vcs.gitChangeRemoteCredentials(self.project.getProjectPath(), 2266 self.vcs.gitChangeRemoteCredentials(self.project.getProjectPath(), remote)
1880 remote) 2267
1881
1882 def __gitCherryPick(self): 2268 def __gitCherryPick(self):
1883 """ 2269 """
1884 Private slot used to copy commits into the current branch. 2270 Private slot used to copy commits into the current branch.
1885 """ 2271 """
1886 pfile = pathlib.Path(self.project.getProjectFile()) 2272 pfile = pathlib.Path(self.project.getProjectFile())
1887 lastModified = pfile.stat().st_mtime 2273 lastModified = pfile.stat().st_mtime
1888 shouldReopen = ( 2274 shouldReopen = (
1889 self.vcs.gitCherryPick(self.project.getProjectPath()) or 2275 self.vcs.gitCherryPick(self.project.getProjectPath())
1890 pfile.stat().st_mtime != lastModified 2276 or pfile.stat().st_mtime != lastModified
1891 ) 2277 )
1892 if shouldReopen: 2278 if shouldReopen:
1893 res = EricMessageBox.yesNo( 2279 res = EricMessageBox.yesNo(
1894 None, 2280 None,
1895 self.tr("Copy Commits"), 2281 self.tr("Copy Commits"),
1896 self.tr("""The project should be reread. Do this now?"""), 2282 self.tr("""The project should be reread. Do this now?"""),
1897 yesDefault=True) 2283 yesDefault=True,
2284 )
1898 if res: 2285 if res:
1899 self.project.reopenProject() 2286 self.project.reopenProject()
1900 2287
1901 def __gitCherryPickContinue(self): 2288 def __gitCherryPickContinue(self):
1902 """ 2289 """
1903 Private slot used to continue the last copying session after conflicts 2290 Private slot used to continue the last copying session after conflicts
1904 were resolved. 2291 were resolved.
1905 """ 2292 """
1906 pfile = pathlib.Path(self.project.getProjectFile()) 2293 pfile = pathlib.Path(self.project.getProjectFile())
1907 lastModified = pfile.stat().st_mtime 2294 lastModified = pfile.stat().st_mtime
1908 shouldReopen = ( 2295 shouldReopen = (
1909 self.vcs.gitCherryPickContinue(self.project.getProjectPath()) or 2296 self.vcs.gitCherryPickContinue(self.project.getProjectPath())
1910 pfile.stat().st_mtime != lastModified 2297 or pfile.stat().st_mtime != lastModified
1911 ) 2298 )
1912 if shouldReopen: 2299 if shouldReopen:
1913 res = EricMessageBox.yesNo( 2300 res = EricMessageBox.yesNo(
1914 None, 2301 None,
1915 self.tr("Copy Commits (Continue)"), 2302 self.tr("Copy Commits (Continue)"),
1916 self.tr("""The project should be reread. Do this now?"""), 2303 self.tr("""The project should be reread. Do this now?"""),
1917 yesDefault=True) 2304 yesDefault=True,
2305 )
1918 if res: 2306 if res:
1919 self.project.reopenProject() 2307 self.project.reopenProject()
1920 2308
1921 def __gitCherryPickQuit(self): 2309 def __gitCherryPickQuit(self):
1922 """ 2310 """
1923 Private slot used to quit the current copying operation. 2311 Private slot used to quit the current copying operation.
1924 """ 2312 """
1925 pfile = pathlib.Path(self.project.getProjectFile()) 2313 pfile = pathlib.Path(self.project.getProjectFile())
1926 lastModified = pfile.stat().st_mtime 2314 lastModified = pfile.stat().st_mtime
1927 shouldReopen = ( 2315 shouldReopen = (
1928 self.vcs.gitCherryPickQuit(self.project.getProjectPath()) or 2316 self.vcs.gitCherryPickQuit(self.project.getProjectPath())
1929 pfile.stat().st_mtime != lastModified 2317 or pfile.stat().st_mtime != lastModified
1930 ) 2318 )
1931 if shouldReopen: 2319 if shouldReopen:
1932 res = EricMessageBox.yesNo( 2320 res = EricMessageBox.yesNo(
1933 None, 2321 None,
1934 self.tr("Copy Commits (Quit)"), 2322 self.tr("Copy Commits (Quit)"),
1935 self.tr("""The project should be reread. Do this now?"""), 2323 self.tr("""The project should be reread. Do this now?"""),
1936 yesDefault=True) 2324 yesDefault=True,
2325 )
1937 if res: 2326 if res:
1938 self.project.reopenProject() 2327 self.project.reopenProject()
1939 2328
1940 def __gitCherryPickAbort(self): 2329 def __gitCherryPickAbort(self):
1941 """ 2330 """
1942 Private slot used to cancel the last copying session and return to 2331 Private slot used to cancel the last copying session and return to
1943 the previous state. 2332 the previous state.
1944 """ 2333 """
1945 pfile = pathlib.Path(self.project.getProjectFile()) 2334 pfile = pathlib.Path(self.project.getProjectFile())
1946 lastModified = pfile.stat().st_mtime 2335 lastModified = pfile.stat().st_mtime
1947 shouldReopen = ( 2336 shouldReopen = (
1948 self.vcs.gitCherryPickAbort(self.project.getProjectPath()) or 2337 self.vcs.gitCherryPickAbort(self.project.getProjectPath())
1949 pfile.stat().st_mtime != lastModified 2338 or pfile.stat().st_mtime != lastModified
1950 ) 2339 )
1951 if shouldReopen: 2340 if shouldReopen:
1952 res = EricMessageBox.yesNo( 2341 res = EricMessageBox.yesNo(
1953 None, 2342 None,
1954 self.tr("Copy Commits (Cancel)"), 2343 self.tr("Copy Commits (Cancel)"),
1955 self.tr("""The project should be reread. Do this now?"""), 2344 self.tr("""The project should be reread. Do this now?"""),
1956 yesDefault=True) 2345 yesDefault=True,
2346 )
1957 if res: 2347 if res:
1958 self.project.reopenProject() 2348 self.project.reopenProject()
1959 2349
1960 def __gitStashSave(self): 2350 def __gitStashSave(self):
1961 """ 2351 """
1962 Private slot to stash all current changes. 2352 Private slot to stash all current changes.
1963 """ 2353 """
1964 pfile = pathlib.Path(self.project.getProjectFile()) 2354 pfile = pathlib.Path(self.project.getProjectFile())
1965 lastModified = pfile.stat().st_mtime 2355 lastModified = pfile.stat().st_mtime
1966 shouldReopen = ( 2356 shouldReopen = (
1967 self.vcs.gitStashSave(self.project.getProjectPath()) or 2357 self.vcs.gitStashSave(self.project.getProjectPath())
1968 pfile.stat().st_mtime != lastModified 2358 or pfile.stat().st_mtime != lastModified
1969 ) 2359 )
1970 if shouldReopen: 2360 if shouldReopen:
1971 res = EricMessageBox.yesNo( 2361 res = EricMessageBox.yesNo(
1972 self.parent(), 2362 self.parent(),
1973 self.tr("Save Stash"), 2363 self.tr("Save Stash"),
1974 self.tr("""The project should be reread. Do this now?"""), 2364 self.tr("""The project should be reread. Do this now?"""),
1975 yesDefault=True) 2365 yesDefault=True,
2366 )
1976 if res: 2367 if res:
1977 self.project.reopenProject() 2368 self.project.reopenProject()
1978 2369
1979 def __gitStashBrowser(self): 2370 def __gitStashBrowser(self):
1980 """ 2371 """
1981 Private slot used to show the stash browser dialog. 2372 Private slot used to show the stash browser dialog.
1982 """ 2373 """
1983 self.vcs.gitStashBrowser(self.project.getProjectPath()) 2374 self.vcs.gitStashBrowser(self.project.getProjectPath())
1984 2375
1985 def __gitStashShow(self): 2376 def __gitStashShow(self):
1986 """ 2377 """
1987 Private slot to show the contents of the selected stash. 2378 Private slot to show the contents of the selected stash.
1988 """ 2379 """
1989 self.vcs.gitStashShowPatch(self.project.getProjectPath()) 2380 self.vcs.gitStashShowPatch(self.project.getProjectPath())
1990 2381
1991 def __gitStashApply(self): 2382 def __gitStashApply(self):
1992 """ 2383 """
1993 Private slot to restore a stash and keep it. 2384 Private slot to restore a stash and keep it.
1994 """ 2385 """
1995 pfile = pathlib.Path(self.project.getProjectFile()) 2386 pfile = pathlib.Path(self.project.getProjectFile())
1996 lastModified = pfile.stat().st_mtime 2387 lastModified = pfile.stat().st_mtime
1997 shouldReopen = ( 2388 shouldReopen = (
1998 self.vcs.gitStashApply(self.project.getProjectPath()) or 2389 self.vcs.gitStashApply(self.project.getProjectPath())
1999 pfile.stat().st_mtime != lastModified 2390 or pfile.stat().st_mtime != lastModified
2000 ) 2391 )
2001 if shouldReopen: 2392 if shouldReopen:
2002 res = EricMessageBox.yesNo( 2393 res = EricMessageBox.yesNo(
2003 self.parent(), 2394 self.parent(),
2004 self.tr("Restore Stash"), 2395 self.tr("Restore Stash"),
2005 self.tr("""The project should be reread. Do this now?"""), 2396 self.tr("""The project should be reread. Do this now?"""),
2006 yesDefault=True) 2397 yesDefault=True,
2398 )
2007 if res: 2399 if res:
2008 self.project.reopenProject() 2400 self.project.reopenProject()
2009 2401
2010 def __gitStashPop(self): 2402 def __gitStashPop(self):
2011 """ 2403 """
2012 Private slot to restore a stash and delete it. 2404 Private slot to restore a stash and delete it.
2013 """ 2405 """
2014 pfile = pathlib.Path(self.project.getProjectFile()) 2406 pfile = pathlib.Path(self.project.getProjectFile())
2015 lastModified = pfile.stat().st_mtime 2407 lastModified = pfile.stat().st_mtime
2016 shouldReopen = ( 2408 shouldReopen = (
2017 self.vcs.gitStashPop(self.project.getProjectPath()) or 2409 self.vcs.gitStashPop(self.project.getProjectPath())
2018 pfile.stat().st_mtime != lastModified 2410 or pfile.stat().st_mtime != lastModified
2019 ) 2411 )
2020 if shouldReopen: 2412 if shouldReopen:
2021 res = EricMessageBox.yesNo( 2413 res = EricMessageBox.yesNo(
2022 self.parent(), 2414 self.parent(),
2023 self.tr("Restore Stash"), 2415 self.tr("Restore Stash"),
2024 self.tr("""The project should be reread. Do this now?"""), 2416 self.tr("""The project should be reread. Do this now?"""),
2025 yesDefault=True) 2417 yesDefault=True,
2418 )
2026 if res: 2419 if res:
2027 self.project.reopenProject() 2420 self.project.reopenProject()
2028 2421
2029 def __gitStashBranch(self): 2422 def __gitStashBranch(self):
2030 """ 2423 """
2031 Private slot to create a new branch and restore a stash into it. 2424 Private slot to create a new branch and restore a stash into it.
2032 """ 2425 """
2033 pfile = pathlib.Path(self.project.getProjectFile()) 2426 pfile = pathlib.Path(self.project.getProjectFile())
2034 lastModified = pfile.stat().st_mtime 2427 lastModified = pfile.stat().st_mtime
2035 shouldReopen = ( 2428 shouldReopen = (
2036 self.vcs.gitStashBranch(self.project.getProjectPath()) or 2429 self.vcs.gitStashBranch(self.project.getProjectPath())
2037 pfile.stat().st_mtime != lastModified 2430 or pfile.stat().st_mtime != lastModified
2038 ) 2431 )
2039 if shouldReopen: 2432 if shouldReopen:
2040 res = EricMessageBox.yesNo( 2433 res = EricMessageBox.yesNo(
2041 self.parent(), 2434 self.parent(),
2042 self.tr("Create Branch"), 2435 self.tr("Create Branch"),
2043 self.tr("""The project should be reread. Do this now?"""), 2436 self.tr("""The project should be reread. Do this now?"""),
2044 yesDefault=True) 2437 yesDefault=True,
2438 )
2045 if res: 2439 if res:
2046 self.project.reopenProject() 2440 self.project.reopenProject()
2047 2441
2048 def __gitStashDrop(self): 2442 def __gitStashDrop(self):
2049 """ 2443 """
2050 Private slot to drop a stash. 2444 Private slot to drop a stash.
2051 """ 2445 """
2052 self.vcs.gitStashDrop(self.project.getProjectPath()) 2446 self.vcs.gitStashDrop(self.project.getProjectPath())
2053 2447
2054 def __gitStashClear(self): 2448 def __gitStashClear(self):
2055 """ 2449 """
2056 Private slot to clear all stashes. 2450 Private slot to clear all stashes.
2057 """ 2451 """
2058 self.vcs.gitStashClear(self.project.getProjectPath()) 2452 self.vcs.gitStashClear(self.project.getProjectPath())
2059 2453
2060 def __gitConfigure(self): 2454 def __gitConfigure(self):
2061 """ 2455 """
2062 Private method to open the configuration dialog. 2456 Private method to open the configuration dialog.
2063 """ 2457 """
2064 ericApp().getObject("UserInterface").showPreferences("zzz_gitPage") 2458 ericApp().getObject("UserInterface").showPreferences("zzz_gitPage")
2065 2459
2066 def __gitEditUserConfig(self): 2460 def __gitEditUserConfig(self):
2067 """ 2461 """
2068 Private slot used to edit the user configuration file. 2462 Private slot used to edit the user configuration file.
2069 """ 2463 """
2070 self.vcs.gitEditUserConfig() 2464 self.vcs.gitEditUserConfig()
2071 2465
2072 def __gitEditRepoConfig(self): 2466 def __gitEditRepoConfig(self):
2073 """ 2467 """
2074 Private slot used to edit the repository configuration file. 2468 Private slot used to edit the repository configuration file.
2075 """ 2469 """
2076 self.vcs.gitEditConfig(self.project.getProjectPath()) 2470 self.vcs.gitEditConfig(self.project.getProjectPath())
2077 2471
2078 def __gitCreateIgnore(self): 2472 def __gitCreateIgnore(self):
2079 """ 2473 """
2080 Private slot used to create a .gitignore file for the project. 2474 Private slot used to create a .gitignore file for the project.
2081 """ 2475 """
2082 self.vcs.gitCreateIgnoreFile(self.project.getProjectPath(), 2476 self.vcs.gitCreateIgnoreFile(self.project.getProjectPath(), autoAdd=True)
2083 autoAdd=True) 2477
2084
2085 def __gitShowConfig(self): 2478 def __gitShowConfig(self):
2086 """ 2479 """
2087 Private slot used to show the combined configuration. 2480 Private slot used to show the combined configuration.
2088 """ 2481 """
2089 self.vcs.gitShowConfig(self.project.getProjectPath()) 2482 self.vcs.gitShowConfig(self.project.getProjectPath())
2090 2483
2091 def __gitVerify(self): 2484 def __gitVerify(self):
2092 """ 2485 """
2093 Private slot used to verify the connectivity and validity of objects 2486 Private slot used to verify the connectivity and validity of objects
2094 of the database. 2487 of the database.
2095 """ 2488 """
2096 self.vcs.gitVerify(self.project.getProjectPath()) 2489 self.vcs.gitVerify(self.project.getProjectPath())
2097 2490
2098 def __gitHouseKeeping(self): 2491 def __gitHouseKeeping(self):
2099 """ 2492 """
2100 Private slot used to cleanup and optimize the local repository. 2493 Private slot used to cleanup and optimize the local repository.
2101 """ 2494 """
2102 self.vcs.gitHouseKeeping(self.project.getProjectPath()) 2495 self.vcs.gitHouseKeeping(self.project.getProjectPath())
2103 2496
2104 def __gitStatistics(self): 2497 def __gitStatistics(self):
2105 """ 2498 """
2106 Private slot used to show some statistics of the local repository. 2499 Private slot used to show some statistics of the local repository.
2107 """ 2500 """
2108 self.vcs.gitStatistics(self.project.getProjectPath()) 2501 self.vcs.gitStatistics(self.project.getProjectPath())
2109 2502
2110 def __gitCreateArchive(self): 2503 def __gitCreateArchive(self):
2111 """ 2504 """
2112 Private slot used to create an archive from the local repository. 2505 Private slot used to create an archive from the local repository.
2113 """ 2506 """
2114 self.vcs.gitCreateArchive(self.project.getProjectPath()) 2507 self.vcs.gitCreateArchive(self.project.getProjectPath())
2115 2508
2116 def __gitReflogBrowser(self): 2509 def __gitReflogBrowser(self):
2117 """ 2510 """
2118 Private slot to show the reflog of the current project. 2511 Private slot to show the reflog of the current project.
2119 """ 2512 """
2120 self.vcs.gitReflogBrowser(self.project.getProjectPath()) 2513 self.vcs.gitReflogBrowser(self.project.getProjectPath())
2121 2514
2122 def __gitBundle(self): 2515 def __gitBundle(self):
2123 """ 2516 """
2124 Private slot used to create a bundle file. 2517 Private slot used to create a bundle file.
2125 """ 2518 """
2126 self.vcs.gitBundle(self.project.getProjectPath()) 2519 self.vcs.gitBundle(self.project.getProjectPath())
2127 2520
2128 def __gitVerifyBundle(self): 2521 def __gitVerifyBundle(self):
2129 """ 2522 """
2130 Private slot used to verify a bundle file. 2523 Private slot used to verify a bundle file.
2131 """ 2524 """
2132 self.vcs.gitVerifyBundle(self.project.getProjectPath()) 2525 self.vcs.gitVerifyBundle(self.project.getProjectPath())
2133 2526
2134 def __gitBundleListHeads(self): 2527 def __gitBundleListHeads(self):
2135 """ 2528 """
2136 Private slot used to list the heads contained in a bundle file. 2529 Private slot used to list the heads contained in a bundle file.
2137 """ 2530 """
2138 self.vcs.gitBundleListHeads(self.project.getProjectPath()) 2531 self.vcs.gitBundleListHeads(self.project.getProjectPath())
2139 2532
2140 def __gitBundleFetch(self): 2533 def __gitBundleFetch(self):
2141 """ 2534 """
2142 Private slot to apply a head of a bundle file using the fetch method. 2535 Private slot to apply a head of a bundle file using the fetch method.
2143 """ 2536 """
2144 self.vcs.gitBundleFetch(self.project.getProjectPath()) 2537 self.vcs.gitBundleFetch(self.project.getProjectPath())
2145 2538
2146 def __gitBundlePull(self): 2539 def __gitBundlePull(self):
2147 """ 2540 """
2148 Private slot to apply a head of a bundle file using the pull method. 2541 Private slot to apply a head of a bundle file using the pull method.
2149 """ 2542 """
2150 pfile = pathlib.Path(self.project.getProjectFile()) 2543 pfile = pathlib.Path(self.project.getProjectFile())
2151 lastModified = pfile.stat().st_mtime 2544 lastModified = pfile.stat().st_mtime
2152 shouldReopen = ( 2545 shouldReopen = (
2153 self.vcs.gitBundlePull(self.project.getProjectPath()) or 2546 self.vcs.gitBundlePull(self.project.getProjectPath())
2154 pfile.stat().st_mtime != lastModified 2547 or pfile.stat().st_mtime != lastModified
2155 ) 2548 )
2156 if shouldReopen: 2549 if shouldReopen:
2157 res = EricMessageBox.yesNo( 2550 res = EricMessageBox.yesNo(
2158 self.parent(), 2551 self.parent(),
2159 self.tr("Apply Bundle (pull)"), 2552 self.tr("Apply Bundle (pull)"),
2160 self.tr("""The project should be reread. Do this now?"""), 2553 self.tr("""The project should be reread. Do this now?"""),
2161 yesDefault=True) 2554 yesDefault=True,
2555 )
2162 if res: 2556 if res:
2163 self.project.reopenProject() 2557 self.project.reopenProject()
2164 2558
2165 def __gitBisectStart(self): 2559 def __gitBisectStart(self):
2166 """ 2560 """
2167 Private slot used to execute the bisect start command. 2561 Private slot used to execute the bisect start command.
2168 """ 2562 """
2169 self.vcs.gitBisect(self.project.getProjectPath(), "start") 2563 self.vcs.gitBisect(self.project.getProjectPath(), "start")
2170 2564
2171 def __gitBisectStartExtended(self): 2565 def __gitBisectStartExtended(self):
2172 """ 2566 """
2173 Private slot used to execute the bisect start command with options. 2567 Private slot used to execute the bisect start command with options.
2174 """ 2568 """
2175 pfile = pathlib.Path(self.project.getProjectFile()) 2569 pfile = pathlib.Path(self.project.getProjectFile())
2176 lastModified = pfile.stat().st_mtime 2570 lastModified = pfile.stat().st_mtime
2177 shouldReopen = ( 2571 shouldReopen = (
2178 self.vcs.gitBisect(self.project.getProjectPath(), 2572 self.vcs.gitBisect(self.project.getProjectPath(), "start_extended")
2179 "start_extended") or 2573 or pfile.stat().st_mtime != lastModified
2180 pfile.stat().st_mtime != lastModified
2181 ) 2574 )
2182 if shouldReopen: 2575 if shouldReopen:
2183 res = EricMessageBox.yesNo( 2576 res = EricMessageBox.yesNo(
2184 self.parent(), 2577 self.parent(),
2185 self.tr("Bisect"), 2578 self.tr("Bisect"),
2186 self.tr("""The project should be reread. Do this now?"""), 2579 self.tr("""The project should be reread. Do this now?"""),
2187 yesDefault=True) 2580 yesDefault=True,
2581 )
2188 if res: 2582 if res:
2189 self.project.reopenProject() 2583 self.project.reopenProject()
2190 2584
2191 def __gitBisectGood(self): 2585 def __gitBisectGood(self):
2192 """ 2586 """
2193 Private slot used to execute the bisect good command. 2587 Private slot used to execute the bisect good command.
2194 """ 2588 """
2195 pfile = pathlib.Path(self.project.getProjectFile()) 2589 pfile = pathlib.Path(self.project.getProjectFile())
2196 lastModified = pfile.stat().st_mtime 2590 lastModified = pfile.stat().st_mtime
2197 shouldReopen = ( 2591 shouldReopen = (
2198 self.vcs.gitBisect(self.project.getProjectPath(), "good") or 2592 self.vcs.gitBisect(self.project.getProjectPath(), "good")
2199 pfile.stat().st_mtime != lastModified 2593 or pfile.stat().st_mtime != lastModified
2200 ) 2594 )
2201 if shouldReopen: 2595 if shouldReopen:
2202 res = EricMessageBox.yesNo( 2596 res = EricMessageBox.yesNo(
2203 self.parent(), 2597 self.parent(),
2204 self.tr("Bisect"), 2598 self.tr("Bisect"),
2205 self.tr("""The project should be reread. Do this now?"""), 2599 self.tr("""The project should be reread. Do this now?"""),
2206 yesDefault=True) 2600 yesDefault=True,
2601 )
2207 if res: 2602 if res:
2208 self.project.reopenProject() 2603 self.project.reopenProject()
2209 2604
2210 def __gitBisectBad(self): 2605 def __gitBisectBad(self):
2211 """ 2606 """
2212 Private slot used to execute the bisect bad command. 2607 Private slot used to execute the bisect bad command.
2213 """ 2608 """
2214 pfile = pathlib.Path(self.project.getProjectFile()) 2609 pfile = pathlib.Path(self.project.getProjectFile())
2215 lastModified = pfile.stat().st_mtime 2610 lastModified = pfile.stat().st_mtime
2216 shouldReopen = ( 2611 shouldReopen = (
2217 self.vcs.gitBisect(self.project.getProjectPath(), "bad") or 2612 self.vcs.gitBisect(self.project.getProjectPath(), "bad")
2218 pfile.stat().st_mtime != lastModified 2613 or pfile.stat().st_mtime != lastModified
2219 ) 2614 )
2220 if shouldReopen: 2615 if shouldReopen:
2221 res = EricMessageBox.yesNo( 2616 res = EricMessageBox.yesNo(
2222 self.parent(), 2617 self.parent(),
2223 self.tr("Bisect"), 2618 self.tr("Bisect"),
2224 self.tr("""The project should be reread. Do this now?"""), 2619 self.tr("""The project should be reread. Do this now?"""),
2225 yesDefault=True) 2620 yesDefault=True,
2621 )
2226 if res: 2622 if res:
2227 self.project.reopenProject() 2623 self.project.reopenProject()
2228 2624
2229 def __gitBisectSkip(self): 2625 def __gitBisectSkip(self):
2230 """ 2626 """
2231 Private slot used to execute the bisect skip command. 2627 Private slot used to execute the bisect skip command.
2232 """ 2628 """
2233 pfile = pathlib.Path(self.project.getProjectFile()) 2629 pfile = pathlib.Path(self.project.getProjectFile())
2234 lastModified = pfile.stat().st_mtime 2630 lastModified = pfile.stat().st_mtime
2235 shouldReopen = ( 2631 shouldReopen = (
2236 self.vcs.gitBisect(self.project.getProjectPath(), "skip") or 2632 self.vcs.gitBisect(self.project.getProjectPath(), "skip")
2237 pfile.stat().st_mtime != lastModified 2633 or pfile.stat().st_mtime != lastModified
2238 ) 2634 )
2239 if shouldReopen: 2635 if shouldReopen:
2240 res = EricMessageBox.yesNo( 2636 res = EricMessageBox.yesNo(
2241 self.parent(), 2637 self.parent(),
2242 self.tr("Bisect"), 2638 self.tr("Bisect"),
2243 self.tr("""The project should be reread. Do this now?"""), 2639 self.tr("""The project should be reread. Do this now?"""),
2244 yesDefault=True) 2640 yesDefault=True,
2641 )
2245 if res: 2642 if res:
2246 self.project.reopenProject() 2643 self.project.reopenProject()
2247 2644
2248 def __gitBisectReset(self): 2645 def __gitBisectReset(self):
2249 """ 2646 """
2250 Private slot used to execute the bisect reset command. 2647 Private slot used to execute the bisect reset command.
2251 """ 2648 """
2252 pfile = pathlib.Path(self.project.getProjectFile()) 2649 pfile = pathlib.Path(self.project.getProjectFile())
2253 lastModified = pfile.stat().st_mtime 2650 lastModified = pfile.stat().st_mtime
2254 shouldReopen = ( 2651 shouldReopen = (
2255 self.vcs.gitBisect(self.project.getProjectPath(), "reset") or 2652 self.vcs.gitBisect(self.project.getProjectPath(), "reset")
2256 pfile.stat().st_mtime != lastModified 2653 or pfile.stat().st_mtime != lastModified
2257 ) 2654 )
2258 if shouldReopen: 2655 if shouldReopen:
2259 res = EricMessageBox.yesNo( 2656 res = EricMessageBox.yesNo(
2260 self.parent(), 2657 self.parent(),
2261 self.tr("Bisect"), 2658 self.tr("Bisect"),
2262 self.tr("""The project should be reread. Do this now?"""), 2659 self.tr("""The project should be reread. Do this now?"""),
2263 yesDefault=True) 2660 yesDefault=True,
2661 )
2264 if res: 2662 if res:
2265 self.project.reopenProject() 2663 self.project.reopenProject()
2266 2664
2267 def __gitBisectLogBrowser(self): 2665 def __gitBisectLogBrowser(self):
2268 """ 2666 """
2269 Private slot used to show the bisect log browser window. 2667 Private slot used to show the bisect log browser window.
2270 """ 2668 """
2271 self.vcs.gitBisectLogBrowser(self.project.getProjectPath()) 2669 self.vcs.gitBisectLogBrowser(self.project.getProjectPath())
2272 2670
2273 def __gitBisectCreateReplay(self): 2671 def __gitBisectCreateReplay(self):
2274 """ 2672 """
2275 Private slot used to create a replay file for the current bisect 2673 Private slot used to create a replay file for the current bisect
2276 session. 2674 session.
2277 """ 2675 """
2278 self.vcs.gitBisectCreateReplayFile(self.project.getProjectPath()) 2676 self.vcs.gitBisectCreateReplayFile(self.project.getProjectPath())
2279 2677
2280 def __gitBisectEditReplay(self): 2678 def __gitBisectEditReplay(self):
2281 """ 2679 """
2282 Private slot used to edit a bisect replay file. 2680 Private slot used to edit a bisect replay file.
2283 """ 2681 """
2284 self.vcs.gitBisectEditReplayFile(self.project.getProjectPath()) 2682 self.vcs.gitBisectEditReplayFile(self.project.getProjectPath())
2285 2683
2286 def __gitBisectReplay(self): 2684 def __gitBisectReplay(self):
2287 """ 2685 """
2288 Private slot used to replay a bisect session. 2686 Private slot used to replay a bisect session.
2289 """ 2687 """
2290 pfile = pathlib.Path(self.project.getProjectFile()) 2688 pfile = pathlib.Path(self.project.getProjectFile())
2291 lastModified = pfile.stat().st_mtime 2689 lastModified = pfile.stat().st_mtime
2292 shouldReopen = ( 2690 shouldReopen = (
2293 self.vcs.gitBisectReplay(self.project.getProjectPath()) or 2691 self.vcs.gitBisectReplay(self.project.getProjectPath())
2294 pfile.stat().st_mtime != lastModified 2692 or pfile.stat().st_mtime != lastModified
2295 ) 2693 )
2296 if shouldReopen: 2694 if shouldReopen:
2297 res = EricMessageBox.yesNo( 2695 res = EricMessageBox.yesNo(
2298 self.parent(), 2696 self.parent(),
2299 self.tr("Bisect"), 2697 self.tr("Bisect"),
2300 self.tr("""The project should be reread. Do this now?"""), 2698 self.tr("""The project should be reread. Do this now?"""),
2301 yesDefault=True) 2699 yesDefault=True,
2700 )
2302 if res: 2701 if res:
2303 self.project.reopenProject() 2702 self.project.reopenProject()
2304 2703
2305 def __gitCheckPatches(self): 2704 def __gitCheckPatches(self):
2306 """ 2705 """
2307 Private slot to check a list of patch files, if they would apply 2706 Private slot to check a list of patch files, if they would apply
2308 cleanly. 2707 cleanly.
2309 """ 2708 """
2310 self.vcs.gitApplyCheckPatches(self.project.getProjectPath(), 2709 self.vcs.gitApplyCheckPatches(self.project.getProjectPath(), check=True)
2311 check=True) 2710
2312
2313 def __gitApplyPatches(self): 2711 def __gitApplyPatches(self):
2314 """ 2712 """
2315 Private slot to apply a list of patch files. 2713 Private slot to apply a list of patch files.
2316 """ 2714 """
2317 pfile = pathlib.Path(self.project.getProjectFile()) 2715 pfile = pathlib.Path(self.project.getProjectFile())
2320 if pfile.stat().st_mtime != lastModified: 2718 if pfile.stat().st_mtime != lastModified:
2321 res = EricMessageBox.yesNo( 2719 res = EricMessageBox.yesNo(
2322 self.parent(), 2720 self.parent(),
2323 self.tr("Apply patch files"), 2721 self.tr("Apply patch files"),
2324 self.tr("""The project should be reread. Do this now?"""), 2722 self.tr("""The project should be reread. Do this now?"""),
2325 yesDefault=True) 2723 yesDefault=True,
2724 )
2326 if res: 2725 if res:
2327 self.project.reopenProject() 2726 self.project.reopenProject()
2328 2727
2329 def __gitShowPatchStatistics(self): 2728 def __gitShowPatchStatistics(self):
2330 """ 2729 """
2331 Private slot to show some patch statistics. 2730 Private slot to show some patch statistics.
2332 """ 2731 """
2333 self.vcs.gitShowPatchesStatistics(self.project.getProjectPath()) 2732 self.vcs.gitShowPatchesStatistics(self.project.getProjectPath())
2334 2733
2335 def __gitSubmoduleAdd(self): 2734 def __gitSubmoduleAdd(self):
2336 """ 2735 """
2337 Private slot to add a submodule to the current project. 2736 Private slot to add a submodule to the current project.
2338 """ 2737 """
2339 self.vcs.gitSubmoduleAdd(self.project.getProjectPath()) 2738 self.vcs.gitSubmoduleAdd(self.project.getProjectPath())
2340 2739
2341 def __gitSubmodulesList(self): 2740 def __gitSubmodulesList(self):
2342 """ 2741 """
2343 Private slot to list the submodules defined for the current project. 2742 Private slot to list the submodules defined for the current project.
2344 """ 2743 """
2345 self.vcs.gitSubmoduleList(self.project.getProjectPath()) 2744 self.vcs.gitSubmoduleList(self.project.getProjectPath())
2346 2745
2347 def __gitSubmodulesInit(self): 2746 def __gitSubmodulesInit(self):
2348 """ 2747 """
2349 Private slot to initialize submodules of the project. 2748 Private slot to initialize submodules of the project.
2350 """ 2749 """
2351 self.vcs.gitSubmoduleInit(self.project.getProjectPath()) 2750 self.vcs.gitSubmoduleInit(self.project.getProjectPath())
2352 2751
2353 def __gitSubmodulesDeinit(self): 2752 def __gitSubmodulesDeinit(self):
2354 """ 2753 """
2355 Private slot to unregister submodules of the project. 2754 Private slot to unregister submodules of the project.
2356 """ 2755 """
2357 self.vcs.gitSubmoduleDeinit(self.project.getProjectPath()) 2756 self.vcs.gitSubmoduleDeinit(self.project.getProjectPath())
2358 2757
2359 def __gitSubmodulesUpdate(self): 2758 def __gitSubmodulesUpdate(self):
2360 """ 2759 """
2361 Private slot to update submodules of the project. 2760 Private slot to update submodules of the project.
2362 """ 2761 """
2363 self.vcs.gitSubmoduleUpdate(self.project.getProjectPath()) 2762 self.vcs.gitSubmoduleUpdate(self.project.getProjectPath())
2364 2763
2365 def __gitSubmodulesUpdateInit(self): 2764 def __gitSubmodulesUpdateInit(self):
2366 """ 2765 """
2367 Private slot to initialize and update submodules of the project. 2766 Private slot to initialize and update submodules of the project.
2368 """ 2767 """
2369 self.vcs.gitSubmoduleUpdate(self.project.getProjectPath(), 2768 self.vcs.gitSubmoduleUpdate(self.project.getProjectPath(), initialize=True)
2370 initialize=True) 2769
2371
2372 def __gitSubmodulesUpdateRemote(self): 2770 def __gitSubmodulesUpdateRemote(self):
2373 """ 2771 """
2374 Private slot to fetch and update submodules of the project. 2772 Private slot to fetch and update submodules of the project.
2375 """ 2773 """
2376 self.vcs.gitSubmoduleUpdate(self.project.getProjectPath(), 2774 self.vcs.gitSubmoduleUpdate(self.project.getProjectPath(), remote=True)
2377 remote=True) 2775
2378
2379 def __gitSubmodulesUpdateOptions(self): 2776 def __gitSubmodulesUpdateOptions(self):
2380 """ 2777 """
2381 Private slot to update submodules of the project with options. 2778 Private slot to update submodules of the project with options.
2382 """ 2779 """
2383 self.vcs.gitSubmoduleUpdateWithOptions(self.project.getProjectPath()) 2780 self.vcs.gitSubmoduleUpdateWithOptions(self.project.getProjectPath())
2384 2781
2385 def __gitSubmodulesSync(self): 2782 def __gitSubmodulesSync(self):
2386 """ 2783 """
2387 Private slot to synchronize URLs of submodules of the project. 2784 Private slot to synchronize URLs of submodules of the project.
2388 """ 2785 """
2389 self.vcs.gitSubmoduleSync(self.project.getProjectPath()) 2786 self.vcs.gitSubmoduleSync(self.project.getProjectPath())
2390 2787
2391 def __gitSubmodulesStatus(self): 2788 def __gitSubmodulesStatus(self):
2392 """ 2789 """
2393 Private slot to show the status of submodules of the project. 2790 Private slot to show the status of submodules of the project.
2394 """ 2791 """
2395 self.vcs.gitSubmoduleStatus(self.project.getProjectPath()) 2792 self.vcs.gitSubmoduleStatus(self.project.getProjectPath())
2396 2793
2397 def __gitSubmodulesSummary(self): 2794 def __gitSubmodulesSummary(self):
2398 """ 2795 """
2399 Private slot to show summary information for submodules of the project. 2796 Private slot to show summary information for submodules of the project.
2400 """ 2797 """
2401 self.vcs.gitSubmoduleSummary(self.project.getProjectPath()) 2798 self.vcs.gitSubmoduleSummary(self.project.getProjectPath())

eric ide

mercurial