eric7/Plugins/VcsPlugins/vcsPySvn/ProjectHelper.py

branch
eric7
changeset 8312
800c432b34c8
parent 7923
91e843545d9a
child 8318
962bce857696
equal deleted inserted replaced
8311:4e8b98454baa 8312:800c432b34c8
1 # -*- coding: utf-8 -*-
2
3 # Copyright (c) 2005 - 2021 Detlev Offenbach <detlev@die-offenbachs.de>
4 #
5
6 """
7 Module implementing the VCS project helper for Subversion.
8 """
9
10 import os
11
12 from PyQt5.QtWidgets import QToolBar
13
14 from VCS.ProjectHelper import VcsProjectHelper
15
16 from E5Gui.E5Action import E5Action
17 from E5Gui.E5Application import e5App
18
19 import UI.PixmapCache
20
21
22 class PySvnProjectHelper(VcsProjectHelper):
23 """
24 Class implementing the VCS project helper for Subversion.
25 """
26 def __init__(self, vcsObject, projectObject, parent=None, name=None):
27 """
28 Constructor
29
30 @param vcsObject reference to the vcs object
31 @param projectObject reference to the project object
32 @param parent parent widget (QWidget)
33 @param name name of this object (string)
34 """
35 VcsProjectHelper.__init__(self, vcsObject, projectObject, parent, name)
36
37 def getActions(self):
38 """
39 Public method to get a list of all actions.
40
41 @return list of all actions (list of E5Action)
42 """
43 return self.actions[:]
44
45 def initActions(self):
46 """
47 Public method to generate the action objects.
48 """
49 self.vcsNewAct = E5Action(
50 self.tr('New from repository'),
51 UI.PixmapCache.getIcon("vcsCheckout"),
52 self.tr('&New from repository...'), 0, 0, self,
53 'pysvn_new')
54 self.vcsNewAct.setStatusTip(self.tr(
55 'Create a new project from the VCS repository'
56 ))
57 self.vcsNewAct.setWhatsThis(self.tr(
58 """<b>New from repository</b>"""
59 """<p>This creates a new local project from the VCS"""
60 """ repository.</p>"""
61 ))
62 self.vcsNewAct.triggered.connect(self._vcsCheckout)
63 self.actions.append(self.vcsNewAct)
64
65 self.vcsUpdateAct = E5Action(
66 self.tr('Update from repository'),
67 UI.PixmapCache.getIcon("vcsUpdate"),
68 self.tr('&Update from repository'), 0, 0, self,
69 'pysvn_update')
70 self.vcsUpdateAct.setStatusTip(self.tr(
71 'Update the local project from the VCS repository'
72 ))
73 self.vcsUpdateAct.setWhatsThis(self.tr(
74 """<b>Update from repository</b>"""
75 """<p>This updates the local project from the VCS"""
76 """ repository.</p>"""
77 ))
78 self.vcsUpdateAct.triggered.connect(self._vcsUpdate)
79 self.actions.append(self.vcsUpdateAct)
80
81 self.vcsCommitAct = E5Action(
82 self.tr('Commit changes to repository'),
83 UI.PixmapCache.getIcon("vcsCommit"),
84 self.tr('&Commit changes to repository...'), 0, 0, self,
85 'pysvn_commit')
86 self.vcsCommitAct.setStatusTip(self.tr(
87 'Commit changes to the local project to the VCS repository'
88 ))
89 self.vcsCommitAct.setWhatsThis(self.tr(
90 """<b>Commit changes to repository</b>"""
91 """<p>This commits changes to the local project to the VCS"""
92 """ repository.</p>"""
93 ))
94 self.vcsCommitAct.triggered.connect(self._vcsCommit)
95 self.actions.append(self.vcsCommitAct)
96
97 self.svnLogBrowserAct = E5Action(
98 self.tr('Show log browser'),
99 UI.PixmapCache.getIcon("vcsLog"),
100 self.tr('Show log browser'),
101 0, 0, self, 'pysvn_log_browser')
102 self.svnLogBrowserAct.setStatusTip(self.tr(
103 'Show a dialog to browse the log of the local project'
104 ))
105 self.svnLogBrowserAct.setWhatsThis(self.tr(
106 """<b>Show log browser</b>"""
107 """<p>This shows a dialog to browse the log of the local"""
108 """ project. A limited number of entries is shown first. More"""
109 """ can be retrieved later on.</p>"""
110 ))
111 self.svnLogBrowserAct.triggered.connect(self._vcsLogBrowser)
112 self.actions.append(self.svnLogBrowserAct)
113
114 self.vcsDiffAct = E5Action(
115 self.tr('Show differences'),
116 UI.PixmapCache.getIcon("vcsDiff"),
117 self.tr('Show &difference'),
118 0, 0, self, 'pysvn_diff')
119 self.vcsDiffAct.setStatusTip(self.tr(
120 'Show the difference of the local project to the repository'
121 ))
122 self.vcsDiffAct.setWhatsThis(self.tr(
123 """<b>Show differences</b>"""
124 """<p>This shows differences of the local project to the"""
125 """ repository.</p>"""
126 ))
127 self.vcsDiffAct.triggered.connect(self._vcsDiff)
128 self.actions.append(self.vcsDiffAct)
129
130 self.svnExtDiffAct = E5Action(
131 self.tr('Show differences (extended)'),
132 UI.PixmapCache.getIcon("vcsDiff"),
133 self.tr('Show differences (extended)'),
134 0, 0, self, 'pysvn_extendeddiff')
135 self.svnExtDiffAct.setStatusTip(self.tr(
136 'Show the difference of revisions of the project to the repository'
137 ))
138 self.svnExtDiffAct.setWhatsThis(self.tr(
139 """<b>Show differences (extended)</b>"""
140 """<p>This shows differences of selectable revisions of"""
141 """ the project.</p>"""
142 ))
143 self.svnExtDiffAct.triggered.connect(self.__svnExtendedDiff)
144 self.actions.append(self.svnExtDiffAct)
145
146 self.svnUrlDiffAct = E5Action(
147 self.tr('Show differences (URLs)'),
148 UI.PixmapCache.getIcon("vcsDiff"),
149 self.tr('Show differences (URLs)'),
150 0, 0, self, 'pysvn_urldiff')
151 self.svnUrlDiffAct.setStatusTip(self.tr(
152 'Show the difference of the project between two repository URLs'
153 ))
154 self.svnUrlDiffAct.setWhatsThis(self.tr(
155 """<b>Show differences (URLs)</b>"""
156 """<p>This shows differences of the project between"""
157 """ two repository URLs.</p>"""
158 ))
159 self.svnUrlDiffAct.triggered.connect(self.__svnUrlDiff)
160 self.actions.append(self.svnUrlDiffAct)
161
162 self.vcsStatusAct = E5Action(
163 self.tr('Show status'),
164 UI.PixmapCache.getIcon("vcsStatus"),
165 self.tr('Show &status'),
166 0, 0, self, 'pysvn_status')
167 self.vcsStatusAct.setStatusTip(self.tr(
168 'Show the status of the local project'
169 ))
170 self.vcsStatusAct.setWhatsThis(self.tr(
171 """<b>Show status</b>"""
172 """<p>This shows the status of the local project.</p>"""
173 ))
174 self.vcsStatusAct.triggered.connect(self._vcsStatus)
175 self.actions.append(self.vcsStatusAct)
176
177 self.svnChangeListsAct = E5Action(
178 self.tr('Show change lists'),
179 UI.PixmapCache.getIcon("vcsChangeLists"),
180 self.tr('Show change lists'),
181 0, 0, self, 'pysvn_changelists')
182 self.svnChangeListsAct.setStatusTip(self.tr(
183 'Show the change lists and associated files of the local project'
184 ))
185 self.svnChangeListsAct.setWhatsThis(self.tr(
186 """<b>Show change lists</b>"""
187 """<p>This shows the change lists and associated files of the"""
188 """ local project.</p>"""
189 ))
190 self.svnChangeListsAct.triggered.connect(self.__svnChangeLists)
191 self.actions.append(self.svnChangeListsAct)
192
193 self.svnRepoInfoAct = E5Action(
194 self.tr('Show repository info'),
195 UI.PixmapCache.getIcon("vcsRepo"),
196 self.tr('Show repository info'),
197 0, 0, self, 'pysvn_repoinfo')
198 self.svnRepoInfoAct.setStatusTip(self.tr(
199 'Show some repository related information for the local project'
200 ))
201 self.svnRepoInfoAct.setWhatsThis(self.tr(
202 """<b>Show repository info</b>"""
203 """<p>This shows some repository related information for"""
204 """ the local project.</p>"""
205 ))
206 self.svnRepoInfoAct.triggered.connect(self.__svnInfo)
207 self.actions.append(self.svnRepoInfoAct)
208
209 self.vcsTagAct = E5Action(
210 self.tr('Tag in repository'),
211 UI.PixmapCache.getIcon("vcsTag"),
212 self.tr('&Tag in repository...'),
213 0, 0, self, 'pysvn_tag')
214 self.vcsTagAct.setStatusTip(self.tr(
215 'Tag the local project in the repository'
216 ))
217 self.vcsTagAct.setWhatsThis(self.tr(
218 """<b>Tag in repository</b>"""
219 """<p>This tags the local project in the repository.</p>"""
220 ))
221 self.vcsTagAct.triggered.connect(self._vcsTag)
222 self.actions.append(self.vcsTagAct)
223
224 self.vcsExportAct = E5Action(
225 self.tr('Export from repository'),
226 UI.PixmapCache.getIcon("vcsExport"),
227 self.tr('&Export from repository...'),
228 0, 0, self, 'pysvn_export')
229 self.vcsExportAct.setStatusTip(self.tr(
230 'Export a project from the repository'
231 ))
232 self.vcsExportAct.setWhatsThis(self.tr(
233 """<b>Export from repository</b>"""
234 """<p>This exports a project from the repository.</p>"""
235 ))
236 self.vcsExportAct.triggered.connect(self._vcsExport)
237 self.actions.append(self.vcsExportAct)
238
239 self.vcsPropsAct = E5Action(
240 self.tr('Command options'),
241 self.tr('Command &options...'), 0, 0, self,
242 'pysvn_options')
243 self.vcsPropsAct.setStatusTip(self.tr(
244 'Show the VCS command options'))
245 self.vcsPropsAct.setWhatsThis(self.tr(
246 """<b>Command options...</b>"""
247 """<p>This shows a dialog to edit the VCS command options.</p>"""
248 ))
249 self.vcsPropsAct.triggered.connect(self._vcsCommandOptions)
250 self.actions.append(self.vcsPropsAct)
251
252 self.vcsRevertAct = E5Action(
253 self.tr('Revert changes'),
254 UI.PixmapCache.getIcon("vcsRevert"),
255 self.tr('Re&vert changes'),
256 0, 0, self, 'pysvn_revert')
257 self.vcsRevertAct.setStatusTip(self.tr(
258 'Revert all changes made to the local project'
259 ))
260 self.vcsRevertAct.setWhatsThis(self.tr(
261 """<b>Revert changes</b>"""
262 """<p>This reverts all changes made to the local project.</p>"""
263 ))
264 self.vcsRevertAct.triggered.connect(self._vcsRevert)
265 self.actions.append(self.vcsRevertAct)
266
267 self.vcsMergeAct = E5Action(
268 self.tr('Merge'),
269 UI.PixmapCache.getIcon("vcsMerge"),
270 self.tr('Mer&ge changes...'),
271 0, 0, self, 'pysvn_merge')
272 self.vcsMergeAct.setStatusTip(self.tr(
273 'Merge changes of a tag/revision into the local project'
274 ))
275 self.vcsMergeAct.setWhatsThis(self.tr(
276 """<b>Merge</b>"""
277 """<p>This merges changes of a tag/revision into the local"""
278 """ project.</p>"""
279 ))
280 self.vcsMergeAct.triggered.connect(self._vcsMerge)
281 self.actions.append(self.vcsMergeAct)
282
283 self.vcsSwitchAct = E5Action(
284 self.tr('Switch'),
285 UI.PixmapCache.getIcon("vcsSwitch"),
286 self.tr('S&witch...'),
287 0, 0, self, 'pysvn_switch')
288 self.vcsSwitchAct.setStatusTip(self.tr(
289 'Switch the local copy to another tag/branch'
290 ))
291 self.vcsSwitchAct.setWhatsThis(self.tr(
292 """<b>Switch</b>"""
293 """<p>This switches the local copy to another tag/branch.</p>"""
294 ))
295 self.vcsSwitchAct.triggered.connect(self._vcsSwitch)
296 self.actions.append(self.vcsSwitchAct)
297
298 self.vcsResolveAct = E5Action(
299 self.tr('Conflicts resolved'),
300 self.tr('Con&flicts resolved'),
301 0, 0, self, 'pysvn_resolve')
302 self.vcsResolveAct.setStatusTip(self.tr(
303 'Mark all conflicts of the local project as resolved'
304 ))
305 self.vcsResolveAct.setWhatsThis(self.tr(
306 """<b>Conflicts resolved</b>"""
307 """<p>This marks all conflicts of the local project as"""
308 """ resolved.</p>"""
309 ))
310 self.vcsResolveAct.triggered.connect(self.__svnResolve)
311 self.actions.append(self.vcsResolveAct)
312
313 self.vcsCleanupAct = E5Action(
314 self.tr('Cleanup'),
315 self.tr('Cleanu&p'),
316 0, 0, self, 'pysvn_cleanup')
317 self.vcsCleanupAct.setStatusTip(self.tr(
318 'Cleanup the local project'
319 ))
320 self.vcsCleanupAct.setWhatsThis(self.tr(
321 """<b>Cleanup</b>"""
322 """<p>This performs a cleanup of the local project.</p>"""
323 ))
324 self.vcsCleanupAct.triggered.connect(self._vcsCleanup)
325 self.actions.append(self.vcsCleanupAct)
326
327 self.vcsCommandAct = E5Action(
328 self.tr('Execute command'),
329 self.tr('E&xecute command...'),
330 0, 0, self, 'pysvn_command')
331 self.vcsCommandAct.setStatusTip(self.tr(
332 'Execute an arbitrary VCS command'
333 ))
334 self.vcsCommandAct.setWhatsThis(self.tr(
335 """<b>Execute command</b>"""
336 """<p>This opens a dialog to enter an arbitrary VCS command.</p>"""
337 ))
338 self.vcsCommandAct.triggered.connect(self._vcsCommand)
339 self.actions.append(self.vcsCommandAct)
340
341 self.svnTagListAct = E5Action(
342 self.tr('List tags'),
343 self.tr('List tags...'),
344 0, 0, self, 'pysvn_list_tags')
345 self.svnTagListAct.setStatusTip(self.tr(
346 'List tags of the project'
347 ))
348 self.svnTagListAct.setWhatsThis(self.tr(
349 """<b>List tags</b>"""
350 """<p>This lists the tags of the project.</p>"""
351 ))
352 self.svnTagListAct.triggered.connect(self.__svnTagList)
353 self.actions.append(self.svnTagListAct)
354
355 self.svnBranchListAct = E5Action(
356 self.tr('List branches'),
357 self.tr('List branches...'),
358 0, 0, self, 'pysvn_list_branches')
359 self.svnBranchListAct.setStatusTip(self.tr(
360 'List branches of the project'
361 ))
362 self.svnBranchListAct.setWhatsThis(self.tr(
363 """<b>List branches</b>"""
364 """<p>This lists the branches of the project.</p>"""
365 ))
366 self.svnBranchListAct.triggered.connect(self.__svnBranchList)
367 self.actions.append(self.svnBranchListAct)
368
369 self.svnListAct = E5Action(
370 self.tr('List repository contents'),
371 self.tr('List repository contents...'),
372 0, 0, self, 'pysvn_contents')
373 self.svnListAct.setStatusTip(self.tr(
374 'Lists the contents of the repository'
375 ))
376 self.svnListAct.setWhatsThis(self.tr(
377 """<b>List repository contents</b>"""
378 """<p>This lists the contents of the repository.</p>"""
379 ))
380 self.svnListAct.triggered.connect(self.__svnTagList)
381 self.actions.append(self.svnListAct)
382
383 self.svnPropSetAct = E5Action(
384 self.tr('Set Property'),
385 self.tr('Set Property...'),
386 0, 0, self, 'pysvn_property_set')
387 self.svnPropSetAct.setStatusTip(self.tr(
388 'Set a property for the project files'
389 ))
390 self.svnPropSetAct.setWhatsThis(self.tr(
391 """<b>Set Property</b>"""
392 """<p>This sets a property for the project files.</p>"""
393 ))
394 self.svnPropSetAct.triggered.connect(self.__svnPropSet)
395 self.actions.append(self.svnPropSetAct)
396
397 self.svnPropListAct = E5Action(
398 self.tr('List Properties'),
399 self.tr('List Properties...'),
400 0, 0, self, 'pysvn_property_list')
401 self.svnPropListAct.setStatusTip(self.tr(
402 'List properties of the project files'
403 ))
404 self.svnPropListAct.setWhatsThis(self.tr(
405 """<b>List Properties</b>"""
406 """<p>This lists the properties of the project files.</p>"""
407 ))
408 self.svnPropListAct.triggered.connect(self.__svnPropList)
409 self.actions.append(self.svnPropListAct)
410
411 self.svnPropDelAct = E5Action(
412 self.tr('Delete Property'),
413 self.tr('Delete Property...'),
414 0, 0, self, 'pysvn_property_delete')
415 self.svnPropDelAct.setStatusTip(self.tr(
416 'Delete a property for the project files'
417 ))
418 self.svnPropDelAct.setWhatsThis(self.tr(
419 """<b>Delete Property</b>"""
420 """<p>This deletes a property for the project files.</p>"""
421 ))
422 self.svnPropDelAct.triggered.connect(self.__svnPropDel)
423 self.actions.append(self.svnPropDelAct)
424
425 self.svnRelocateAct = E5Action(
426 self.tr('Relocate'),
427 UI.PixmapCache.getIcon("vcsSwitch"),
428 self.tr('Relocate...'),
429 0, 0, self, 'pysvn_relocate')
430 self.svnRelocateAct.setStatusTip(self.tr(
431 'Relocate the working copy to a new repository URL'
432 ))
433 self.svnRelocateAct.setWhatsThis(self.tr(
434 """<b>Relocate</b>"""
435 """<p>This relocates the working copy to a new repository"""
436 """ URL.</p>"""
437 ))
438 self.svnRelocateAct.triggered.connect(self.__svnRelocate)
439 self.actions.append(self.svnRelocateAct)
440
441 self.svnRepoBrowserAct = E5Action(
442 self.tr('Repository Browser'),
443 UI.PixmapCache.getIcon("vcsRepoBrowser"),
444 self.tr('Repository Browser...'),
445 0, 0, self, 'pysvn_repo_browser')
446 self.svnRepoBrowserAct.setStatusTip(self.tr(
447 'Show the Repository Browser dialog'
448 ))
449 self.svnRepoBrowserAct.setWhatsThis(self.tr(
450 """<b>Repository Browser</b>"""
451 """<p>This shows the Repository Browser dialog.</p>"""
452 ))
453 self.svnRepoBrowserAct.triggered.connect(self.__svnRepoBrowser)
454 self.actions.append(self.svnRepoBrowserAct)
455
456 self.svnConfigAct = E5Action(
457 self.tr('Configure'),
458 self.tr('Configure...'),
459 0, 0, self, 'pysvn_configure')
460 self.svnConfigAct.setStatusTip(self.tr(
461 'Show the configuration dialog with the Subversion page selected'
462 ))
463 self.svnConfigAct.setWhatsThis(self.tr(
464 """<b>Configure</b>"""
465 """<p>Show the configuration dialog with the Subversion page"""
466 """ selected.</p>"""
467 ))
468 self.svnConfigAct.triggered.connect(self.__svnConfigure)
469 self.actions.append(self.svnConfigAct)
470
471 self.svnUpgradeAct = E5Action(
472 self.tr('Upgrade'),
473 self.tr('Upgrade...'),
474 0, 0, self, 'pysvn_upgrade')
475 self.svnUpgradeAct.setStatusTip(self.tr(
476 'Upgrade the working copy to the current format'
477 ))
478 self.svnUpgradeAct.setWhatsThis(self.tr(
479 """<b>Upgrade</b>"""
480 """<p>Upgrades the working copy to the current format.</p>"""
481 ))
482 self.svnUpgradeAct.triggered.connect(self.__svnUpgrade)
483 self.actions.append(self.svnUpgradeAct)
484
485 def initMenu(self, menu):
486 """
487 Public method to generate the VCS menu.
488
489 @param menu reference to the menu to be populated (QMenu)
490 """
491 menu.clear()
492
493 act = menu.addAction(
494 UI.PixmapCache.getIcon(
495 os.path.join("VcsPlugins", "vcsPySvn", "icons", "pysvn.svg")),
496 self.vcs.vcsName(), self._vcsInfoDisplay)
497 font = act.font()
498 font.setBold(True)
499 act.setFont(font)
500 menu.addSeparator()
501
502 menu.addAction(self.vcsUpdateAct)
503 menu.addAction(self.vcsCommitAct)
504 menu.addSeparator()
505 menu.addAction(self.vcsTagAct)
506 if self.vcs.otherData["standardLayout"]:
507 menu.addAction(self.svnTagListAct)
508 menu.addAction(self.svnBranchListAct)
509 else:
510 menu.addAction(self.svnListAct)
511 menu.addSeparator()
512 menu.addAction(self.svnLogBrowserAct)
513 menu.addSeparator()
514 menu.addAction(self.vcsStatusAct)
515 menu.addAction(self.svnChangeListsAct)
516 menu.addAction(self.svnRepoInfoAct)
517 menu.addSeparator()
518 menu.addAction(self.vcsDiffAct)
519 menu.addAction(self.svnExtDiffAct)
520 menu.addAction(self.svnUrlDiffAct)
521 menu.addSeparator()
522 menu.addAction(self.vcsRevertAct)
523 menu.addAction(self.vcsMergeAct)
524 menu.addAction(self.vcsResolveAct)
525 menu.addSeparator()
526 menu.addAction(self.vcsSwitchAct)
527 menu.addAction(self.svnRelocateAct)
528 menu.addSeparator()
529 menu.addAction(self.svnPropSetAct)
530 menu.addAction(self.svnPropListAct)
531 menu.addAction(self.svnPropDelAct)
532 menu.addSeparator()
533 menu.addAction(self.vcsCleanupAct)
534 menu.addSeparator()
535 menu.addAction(self.vcsCommandAct)
536 menu.addAction(self.svnRepoBrowserAct)
537 menu.addAction(self.svnUpgradeAct)
538 menu.addSeparator()
539 menu.addAction(self.vcsPropsAct)
540 menu.addSeparator()
541 menu.addAction(self.svnConfigAct)
542 menu.addSeparator()
543 menu.addAction(self.vcsNewAct)
544 menu.addAction(self.vcsExportAct)
545
546 def initToolbar(self, ui, toolbarManager):
547 """
548 Public slot to initialize the VCS toolbar.
549
550 @param ui reference to the main window (UserInterface)
551 @param toolbarManager reference to a toolbar manager object
552 (E5ToolBarManager)
553 """
554 self.__toolbar = QToolBar(self.tr("Subversion (pysvn)"), ui)
555 self.__toolbar.setIconSize(UI.Config.ToolBarIconSize)
556 self.__toolbar.setObjectName("PySvnToolbar")
557 self.__toolbar.setToolTip(self.tr('Subversion (pysvn)'))
558
559 self.__toolbar.addAction(self.svnLogBrowserAct)
560 self.__toolbar.addAction(self.vcsStatusAct)
561 self.__toolbar.addSeparator()
562 self.__toolbar.addAction(self.vcsDiffAct)
563 self.__toolbar.addSeparator()
564 self.__toolbar.addAction(self.svnRepoBrowserAct)
565 self.__toolbar.addAction(self.vcsNewAct)
566 self.__toolbar.addAction(self.vcsExportAct)
567 self.__toolbar.addSeparator()
568
569 title = self.__toolbar.windowTitle()
570 toolbarManager.addToolBar(self.__toolbar, title)
571 toolbarManager.addAction(self.vcsUpdateAct, title)
572 toolbarManager.addAction(self.vcsCommitAct, title)
573 toolbarManager.addAction(self.svnExtDiffAct, title)
574 toolbarManager.addAction(self.svnUrlDiffAct, title)
575 toolbarManager.addAction(self.svnChangeListsAct, title)
576 toolbarManager.addAction(self.svnRepoInfoAct, title)
577 toolbarManager.addAction(self.vcsTagAct, title)
578 toolbarManager.addAction(self.vcsRevertAct, title)
579 toolbarManager.addAction(self.vcsMergeAct, title)
580 toolbarManager.addAction(self.vcsSwitchAct, title)
581 toolbarManager.addAction(self.svnRelocateAct, title)
582
583 self.__toolbar.setEnabled(False)
584 self.__toolbar.setVisible(False)
585
586 ui.registerToolbar("pysvn", self.__toolbar.windowTitle(),
587 self.__toolbar, "vcs")
588 ui.addToolBar(self.__toolbar)
589
590 def removeToolbar(self, ui, toolbarManager):
591 """
592 Public method to remove a toolbar created by initToolbar().
593
594 @param ui reference to the main window (UserInterface)
595 @param toolbarManager reference to a toolbar manager object
596 (E5ToolBarManager)
597 """
598 ui.removeToolBar(self.__toolbar)
599 ui.unregisterToolbar("pysvn")
600
601 title = self.__toolbar.windowTitle()
602 toolbarManager.removeCategoryActions(title)
603 toolbarManager.removeToolBar(self.__toolbar)
604
605 self.__toolbar.deleteLater()
606 self.__toolbar = None
607
608 def __svnResolve(self):
609 """
610 Private slot used to resolve conflicts of the local project.
611 """
612 self.vcs.svnResolve(self.project.ppath)
613
614 def __svnPropList(self):
615 """
616 Private slot used to list the properties of the project files.
617 """
618 self.vcs.svnListProps(self.project.ppath, True)
619
620 def __svnPropSet(self):
621 """
622 Private slot used to set a property for the project files.
623 """
624 self.vcs.svnSetProp(self.project.ppath, True)
625
626 def __svnPropDel(self):
627 """
628 Private slot used to delete a property for the project files.
629 """
630 self.vcs.svnDelProp(self.project.ppath, True)
631
632 def __svnTagList(self):
633 """
634 Private slot used to list the tags of the project.
635 """
636 self.vcs.svnListTagBranch(self.project.ppath, True)
637
638 def __svnBranchList(self):
639 """
640 Private slot used to list the branches of the project.
641 """
642 self.vcs.svnListTagBranch(self.project.ppath, False)
643
644 def __svnExtendedDiff(self):
645 """
646 Private slot used to perform a svn diff with the selection of
647 revisions.
648 """
649 self.vcs.svnExtendedDiff(self.project.ppath)
650
651 def __svnUrlDiff(self):
652 """
653 Private slot used to perform a svn diff with the selection of
654 repository URLs.
655 """
656 self.vcs.svnUrlDiff(self.project.ppath)
657
658 def __svnInfo(self):
659 """
660 Private slot used to show repository information for the local project.
661 """
662 self.vcs.svnInfo(self.project.ppath, ".")
663
664 def __svnRelocate(self):
665 """
666 Private slot used to relocate the working copy to a new repository URL.
667 """
668 self.vcs.svnRelocate(self.project.ppath)
669
670 def __svnRepoBrowser(self):
671 """
672 Private slot to open the repository browser.
673 """
674 self.vcs.svnRepoBrowser(projectPath=self.project.ppath)
675
676 def __svnConfigure(self):
677 """
678 Private slot to open the configuration dialog.
679 """
680 e5App().getObject("UserInterface").showPreferences(
681 "zzz_subversionPage")
682
683 def __svnChangeLists(self):
684 """
685 Private slot used to show a list of change lists.
686 """
687 self.vcs.svnShowChangelists(self.project.ppath)
688
689 def __svnUpgrade(self):
690 """
691 Private slot used to upgrade the working copy format.
692 """
693 self.vcs.svnUpgrade(self.project.ppath)

eric ide

mercurial