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

eric ide

mercurial