eric6/Plugins/VcsPlugins/vcsGit/ProjectHelper.py

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

eric ide

mercurial