45 |
45 |
46 def initActions(self): |
46 def initActions(self): |
47 """ |
47 """ |
48 Public method to generate the action objects. |
48 Public method to generate the action objects. |
49 """ |
49 """ |
50 self.vcsNewAct = E5Action(self.trUtf8('New from repository'), |
50 self.vcsNewAct = E5Action( |
51 UI.PixmapCache.getIcon("vcsCheckout.png"), |
51 self.trUtf8('New from repository'), |
52 self.trUtf8('&New from repository...'), 0, 0, self, 'subversion_new') |
52 UI.PixmapCache.getIcon("vcsCheckout.png"), |
|
53 self.trUtf8('&New from repository...'), 0, 0, self, |
|
54 'subversion_new') |
53 self.vcsNewAct.setStatusTip(self.trUtf8( |
55 self.vcsNewAct.setStatusTip(self.trUtf8( |
54 'Create a new project from the VCS repository' |
56 'Create a new project from the VCS repository' |
55 )) |
57 )) |
56 self.vcsNewAct.setWhatsThis(self.trUtf8( |
58 self.vcsNewAct.setWhatsThis(self.trUtf8( |
57 """<b>New from repository</b>""" |
59 """<b>New from repository</b>""" |
58 """<p>This creates a new local project from the VCS repository.</p>""" |
60 """<p>This creates a new local project from the VCS""" |
|
61 """ repository.</p>""" |
59 )) |
62 )) |
60 self.vcsNewAct.triggered[()].connect(self._vcsCheckout) |
63 self.vcsNewAct.triggered[()].connect(self._vcsCheckout) |
61 self.actions.append(self.vcsNewAct) |
64 self.actions.append(self.vcsNewAct) |
62 |
65 |
63 self.vcsUpdateAct = E5Action(self.trUtf8('Update from repository'), |
66 self.vcsUpdateAct = E5Action(self.trUtf8('Update from repository'), |
67 self.vcsUpdateAct.setStatusTip(self.trUtf8( |
70 self.vcsUpdateAct.setStatusTip(self.trUtf8( |
68 'Update the local project from the VCS repository' |
71 'Update the local project from the VCS repository' |
69 )) |
72 )) |
70 self.vcsUpdateAct.setWhatsThis(self.trUtf8( |
73 self.vcsUpdateAct.setWhatsThis(self.trUtf8( |
71 """<b>Update from repository</b>""" |
74 """<b>Update from repository</b>""" |
72 """<p>This updates the local project from the VCS repository.</p>""" |
75 """<p>This updates the local project from the VCS""" |
|
76 """ repository.</p>""" |
73 )) |
77 )) |
74 self.vcsUpdateAct.triggered[()].connect(self._vcsUpdate) |
78 self.vcsUpdateAct.triggered[()].connect(self._vcsUpdate) |
75 self.actions.append(self.vcsUpdateAct) |
79 self.actions.append(self.vcsUpdateAct) |
76 |
80 |
77 self.vcsCommitAct = E5Action(self.trUtf8('Commit changes to repository'), |
81 self.vcsCommitAct = E5Action( |
78 UI.PixmapCache.getIcon("vcsCommit.png"), |
82 self.trUtf8('Commit changes to repository'), |
79 self.trUtf8('&Commit changes to repository...'), 0, 0, self, |
83 UI.PixmapCache.getIcon("vcsCommit.png"), |
80 'subversion_commit') |
84 self.trUtf8('&Commit changes to repository...'), 0, 0, self, |
|
85 'subversion_commit') |
81 self.vcsCommitAct.setStatusTip(self.trUtf8( |
86 self.vcsCommitAct.setStatusTip(self.trUtf8( |
82 'Commit changes to the local project to the VCS repository' |
87 'Commit changes to the local project to the VCS repository' |
83 )) |
88 )) |
84 self.vcsCommitAct.setWhatsThis(self.trUtf8( |
89 self.vcsCommitAct.setWhatsThis(self.trUtf8( |
85 """<b>Commit changes to repository</b>""" |
90 """<b>Commit changes to repository</b>""" |
86 """<p>This commits changes to the local project to the VCS repository.</p>""" |
91 """<p>This commits changes to the local project to the VCS""" |
|
92 """ repository.</p>""" |
87 )) |
93 )) |
88 self.vcsCommitAct.triggered[()].connect(self._vcsCommit) |
94 self.vcsCommitAct.triggered[()].connect(self._vcsCommit) |
89 self.actions.append(self.vcsCommitAct) |
95 self.actions.append(self.vcsCommitAct) |
90 |
96 |
91 self.vcsLogAct = E5Action(self.trUtf8('Show log'), |
97 self.vcsLogAct = E5Action(self.trUtf8('Show log'), |
109 self.svnLogBrowserAct.setStatusTip(self.trUtf8( |
115 self.svnLogBrowserAct.setStatusTip(self.trUtf8( |
110 'Show a dialog to browse the log of the local project' |
116 'Show a dialog to browse the log of the local project' |
111 )) |
117 )) |
112 self.svnLogBrowserAct.setWhatsThis(self.trUtf8( |
118 self.svnLogBrowserAct.setWhatsThis(self.trUtf8( |
113 """<b>Show log browser</b>""" |
119 """<b>Show log browser</b>""" |
114 """<p>This shows a dialog to browse the log of the local project.""" |
120 """<p>This shows a dialog to browse the log of the local""" |
115 """ A limited number of entries is shown first. More can be""" |
121 """ project. A limited number of entries is shown first. More""" |
116 """ retrieved later on.</p>""" |
122 """ can be retrieved later on.</p>""" |
117 )) |
123 )) |
118 self.svnLogBrowserAct.triggered[()].connect(self.__svnLogBrowser) |
124 self.svnLogBrowserAct.triggered[()].connect(self.__svnLogBrowser) |
119 self.actions.append(self.svnLogBrowserAct) |
125 self.actions.append(self.svnLogBrowserAct) |
120 |
126 |
121 self.vcsDiffAct = E5Action(self.trUtf8('Show difference'), |
127 self.vcsDiffAct = E5Action(self.trUtf8('Show difference'), |
125 self.vcsDiffAct.setStatusTip(self.trUtf8( |
131 self.vcsDiffAct.setStatusTip(self.trUtf8( |
126 'Show the difference of the local project to the repository' |
132 'Show the difference of the local project to the repository' |
127 )) |
133 )) |
128 self.vcsDiffAct.setWhatsThis(self.trUtf8( |
134 self.vcsDiffAct.setWhatsThis(self.trUtf8( |
129 """<b>Show difference</b>""" |
135 """<b>Show difference</b>""" |
130 """<p>This shows the difference of the local project to the repository.</p>""" |
136 """<p>This shows the difference of the local project to the""" |
|
137 """ repository.</p>""" |
131 )) |
138 )) |
132 self.vcsDiffAct.triggered[()].connect(self._vcsDiff) |
139 self.vcsDiffAct.triggered[()].connect(self._vcsDiff) |
133 self.actions.append(self.vcsDiffAct) |
140 self.actions.append(self.vcsDiffAct) |
134 |
141 |
135 self.svnExtDiffAct = E5Action(self.trUtf8('Show difference (extended)'), |
142 self.svnExtDiffAct = E5Action( |
136 UI.PixmapCache.getIcon("vcsDiff.png"), |
143 self.trUtf8('Show difference (extended)'), |
137 self.trUtf8('Show difference (extended)'), |
144 UI.PixmapCache.getIcon("vcsDiff.png"), |
138 0, 0, self, 'subversion_extendeddiff') |
145 self.trUtf8('Show difference (extended)'), |
|
146 0, 0, self, 'subversion_extendeddiff') |
139 self.svnExtDiffAct.setStatusTip(self.trUtf8( |
147 self.svnExtDiffAct.setStatusTip(self.trUtf8( |
140 'Show the difference of revisions of the project to the repository' |
148 'Show the difference of revisions of the project to the repository' |
141 )) |
149 )) |
142 self.svnExtDiffAct.setWhatsThis(self.trUtf8( |
150 self.svnExtDiffAct.setWhatsThis(self.trUtf8( |
143 """<b>Show difference (extended)</b>""" |
151 """<b>Show difference (extended)</b>""" |
144 """<p>This shows the difference of selectable revisions of the project.</p>""" |
152 """<p>This shows the difference of selectable revisions of""" |
|
153 """ the project.</p>""" |
145 )) |
154 )) |
146 self.svnExtDiffAct.triggered[()].connect(self.__svnExtendedDiff) |
155 self.svnExtDiffAct.triggered[()].connect(self.__svnExtendedDiff) |
147 self.actions.append(self.svnExtDiffAct) |
156 self.actions.append(self.svnExtDiffAct) |
148 |
157 |
149 self.svnUrlDiffAct = E5Action(self.trUtf8('Show difference (URLs)'), |
158 self.svnUrlDiffAct = E5Action(self.trUtf8('Show difference (URLs)'), |
219 self.actions.append(self.vcsExportAct) |
228 self.actions.append(self.vcsExportAct) |
220 |
229 |
221 self.vcsPropsAct = E5Action(self.trUtf8('Command options'), |
230 self.vcsPropsAct = E5Action(self.trUtf8('Command options'), |
222 self.trUtf8('Command &options...'), 0, 0, self, |
231 self.trUtf8('Command &options...'), 0, 0, self, |
223 'subversion_options') |
232 'subversion_options') |
224 self.vcsPropsAct.setStatusTip(self.trUtf8('Show the VCS command options')) |
233 self.vcsPropsAct.setStatusTip(self.trUtf8( |
|
234 'Show the VCS command options')) |
225 self.vcsPropsAct.setWhatsThis(self.trUtf8( |
235 self.vcsPropsAct.setWhatsThis(self.trUtf8( |
226 """<b>Command options...</b>""" |
236 """<b>Command options...</b>""" |
227 """<p>This shows a dialog to edit the VCS command options.</p>""" |
237 """<p>This shows a dialog to edit the VCS command options.</p>""" |
228 )) |
238 )) |
229 self.vcsPropsAct.triggered[()].connect(self._vcsCommandOptions) |
239 self.vcsPropsAct.triggered[()].connect(self._vcsCommandOptions) |
250 self.vcsMergeAct.setStatusTip(self.trUtf8( |
260 self.vcsMergeAct.setStatusTip(self.trUtf8( |
251 'Merge changes of a tag/revision into the local project' |
261 'Merge changes of a tag/revision into the local project' |
252 )) |
262 )) |
253 self.vcsMergeAct.setWhatsThis(self.trUtf8( |
263 self.vcsMergeAct.setWhatsThis(self.trUtf8( |
254 """<b>Merge</b>""" |
264 """<b>Merge</b>""" |
255 """<p>This merges changes of a tag/revision into the local project.</p>""" |
265 """<p>This merges changes of a tag/revision into the local""" |
|
266 """ project.</p>""" |
256 )) |
267 )) |
257 self.vcsMergeAct.triggered[()].connect(self._vcsMerge) |
268 self.vcsMergeAct.triggered[()].connect(self._vcsMerge) |
258 self.actions.append(self.vcsMergeAct) |
269 self.actions.append(self.vcsMergeAct) |
259 |
270 |
260 self.vcsSwitchAct = E5Action(self.trUtf8('Switch'), |
271 self.vcsSwitchAct = E5Action(self.trUtf8('Switch'), |
277 self.vcsResolveAct.setStatusTip(self.trUtf8( |
288 self.vcsResolveAct.setStatusTip(self.trUtf8( |
278 'Mark all conflicts of the local project as resolved' |
289 'Mark all conflicts of the local project as resolved' |
279 )) |
290 )) |
280 self.vcsResolveAct.setWhatsThis(self.trUtf8( |
291 self.vcsResolveAct.setWhatsThis(self.trUtf8( |
281 """<b>Conflicts resolved</b>""" |
292 """<b>Conflicts resolved</b>""" |
282 """<p>This marks all conflicts of the local project as resolved.</p>""" |
293 """<p>This marks all conflicts of the local project as""" |
|
294 """ resolved.</p>""" |
283 )) |
295 )) |
284 self.vcsResolveAct.triggered[()].connect(self.__svnResolve) |
296 self.vcsResolveAct.triggered[()].connect(self.__svnResolve) |
285 self.actions.append(self.vcsResolveAct) |
297 self.actions.append(self.vcsResolveAct) |
286 |
298 |
287 self.vcsCleanupAct = E5Action(self.trUtf8('Cleanup'), |
299 self.vcsCleanupAct = E5Action(self.trUtf8('Cleanup'), |
395 self.svnRelocateAct.setStatusTip(self.trUtf8( |
407 self.svnRelocateAct.setStatusTip(self.trUtf8( |
396 'Relocate the working copy to a new repository URL' |
408 'Relocate the working copy to a new repository URL' |
397 )) |
409 )) |
398 self.svnRelocateAct.setWhatsThis(self.trUtf8( |
410 self.svnRelocateAct.setWhatsThis(self.trUtf8( |
399 """<b>Relocate</b>""" |
411 """<b>Relocate</b>""" |
400 """<p>This relocates the working copy to a new repository URL.</p>""" |
412 """<p>This relocates the working copy to a new repository""" |
|
413 """ URL.</p>""" |
401 )) |
414 )) |
402 self.svnRelocateAct.triggered[()].connect(self.__svnRelocate) |
415 self.svnRelocateAct.triggered[()].connect(self.__svnRelocate) |
403 self.actions.append(self.svnRelocateAct) |
416 self.actions.append(self.svnRelocateAct) |
404 |
417 |
405 self.svnRepoBrowserAct = E5Action(self.trUtf8('Repository Browser'), |
418 self.svnRepoBrowserAct = E5Action(self.trUtf8('Repository Browser'), |
422 self.svnConfigAct.setStatusTip(self.trUtf8( |
435 self.svnConfigAct.setStatusTip(self.trUtf8( |
423 'Show the configuration dialog with the Subversion page selected' |
436 'Show the configuration dialog with the Subversion page selected' |
424 )) |
437 )) |
425 self.svnConfigAct.setWhatsThis(self.trUtf8( |
438 self.svnConfigAct.setWhatsThis(self.trUtf8( |
426 """<b>Configure</b>""" |
439 """<b>Configure</b>""" |
427 """<p>Show the configuration dialog with the Subversion page selected.</p>""" |
440 """<p>Show the configuration dialog with the Subversion page""" |
|
441 """ selected.</p>""" |
428 )) |
442 )) |
429 self.svnConfigAct.triggered[()].connect(self.__svnConfigure) |
443 self.svnConfigAct.triggered[()].connect(self.__svnConfigure) |
430 self.actions.append(self.svnConfigAct) |
444 self.actions.append(self.svnConfigAct) |
431 |
445 |
432 def initMenu(self, menu): |
446 def initMenu(self, menu): |
437 """ |
451 """ |
438 menu.clear() |
452 menu.clear() |
439 |
453 |
440 act = menu.addAction( |
454 act = menu.addAction( |
441 UI.PixmapCache.getIcon( |
455 UI.PixmapCache.getIcon( |
442 os.path.join("VcsPlugins", "vcsSubversion", "icons", "subversion.png")), |
456 os.path.join("VcsPlugins", "vcsSubversion", "icons", |
|
457 "subversion.png")), |
443 self.vcs.vcsName(), self._vcsInfoDisplay) |
458 self.vcs.vcsName(), self._vcsInfoDisplay) |
444 font = act.font() |
459 font = act.font() |
445 font.setBold(True) |
460 font.setBold(True) |
446 act.setFont(font) |
461 act.setFont(font) |
447 menu.addSeparator() |
462 menu.addSeparator() |
525 """ |
540 """ |
526 self.vcs.svnListTagBranch(self.project.ppath, False) |
541 self.vcs.svnListTagBranch(self.project.ppath, False) |
527 |
542 |
528 def __svnExtendedDiff(self): |
543 def __svnExtendedDiff(self): |
529 """ |
544 """ |
530 Private slot used to perform a svn diff with the selection of revisions. |
545 Private slot used to perform a svn diff with the selection of |
|
546 revisions. |
531 """ |
547 """ |
532 self.vcs.svnExtendedDiff(self.project.ppath) |
548 self.vcs.svnExtendedDiff(self.project.ppath) |
533 |
549 |
534 def __svnUrlDiff(self): |
550 def __svnUrlDiff(self): |
535 """ |
551 """ |
536 Private slot used to perform a svn diff with the selection of repository URLs. |
552 Private slot used to perform a svn diff with the selection of |
|
553 repository URLs. |
537 """ |
554 """ |
538 self.vcs.svnUrlDiff(self.project.ppath) |
555 self.vcs.svnUrlDiff(self.project.ppath) |
539 |
556 |
540 def __svnLogBrowser(self): |
557 def __svnLogBrowser(self): |
541 """ |
558 """ |
557 |
574 |
558 def __svnConfigure(self): |
575 def __svnConfigure(self): |
559 """ |
576 """ |
560 Private slot to open the configuration dialog. |
577 Private slot to open the configuration dialog. |
561 """ |
578 """ |
562 e5App().getObject("UserInterface").showPreferences("zzz_subversionPage") |
579 e5App().getObject("UserInterface")\ |
|
580 .showPreferences("zzz_subversionPage") |
563 |
581 |
564 def __svnChangeLists(self): |
582 def __svnChangeLists(self): |
565 """ |
583 """ |
566 Private slot used to show a list of change lists. |
584 Private slot used to show a list of change lists. |
567 """ |
585 """ |