Plugins/VcsPlugins/vcsPySvn/ProjectHelper.py

changeset 3009
bf5ae5d7477d
parent 2302
f29e9405c851
child 3024
17c01303a239
child 3057
10516539f238
equal deleted inserted replaced
3008:7848489bcb92 3009:bf5ae5d7477d
43 43
44 def initActions(self): 44 def initActions(self):
45 """ 45 """
46 Public method to generate the action objects. 46 Public method to generate the action objects.
47 """ 47 """
48 self.vcsNewAct = E5Action(self.trUtf8('New from repository'), 48 self.vcsNewAct = E5Action(
49 UI.PixmapCache.getIcon("vcsCheckout.png"), 49 self.trUtf8('New from repository'),
50 self.trUtf8('&New from repository...'), 0, 0, self, 'subversion_new') 50 UI.PixmapCache.getIcon("vcsCheckout.png"),
51 self.trUtf8('&New from repository...'), 0, 0, self,
52 'subversion_new')
51 self.vcsNewAct.setStatusTip(self.trUtf8( 53 self.vcsNewAct.setStatusTip(self.trUtf8(
52 'Create a new project from the VCS repository' 54 'Create a new project from the VCS repository'
53 )) 55 ))
54 self.vcsNewAct.setWhatsThis(self.trUtf8( 56 self.vcsNewAct.setWhatsThis(self.trUtf8(
55 """<b>New from repository</b>""" 57 """<b>New from repository</b>"""
56 """<p>This creates a new local project from the VCS repository.</p>""" 58 """<p>This creates a new local project from the VCS"""
59 """ repository.</p>"""
57 )) 60 ))
58 self.vcsNewAct.triggered[()].connect(self._vcsCheckout) 61 self.vcsNewAct.triggered[()].connect(self._vcsCheckout)
59 self.actions.append(self.vcsNewAct) 62 self.actions.append(self.vcsNewAct)
60 63
61 self.vcsUpdateAct = E5Action(self.trUtf8('Update from repository'), 64 self.vcsUpdateAct = E5Action(self.trUtf8('Update from repository'),
65 self.vcsUpdateAct.setStatusTip(self.trUtf8( 68 self.vcsUpdateAct.setStatusTip(self.trUtf8(
66 'Update the local project from the VCS repository' 69 'Update the local project from the VCS repository'
67 )) 70 ))
68 self.vcsUpdateAct.setWhatsThis(self.trUtf8( 71 self.vcsUpdateAct.setWhatsThis(self.trUtf8(
69 """<b>Update from repository</b>""" 72 """<b>Update from repository</b>"""
70 """<p>This updates the local project from the VCS repository.</p>""" 73 """<p>This updates the local project from the VCS"""
74 """ repository.</p>"""
71 )) 75 ))
72 self.vcsUpdateAct.triggered[()].connect(self._vcsUpdate) 76 self.vcsUpdateAct.triggered[()].connect(self._vcsUpdate)
73 self.actions.append(self.vcsUpdateAct) 77 self.actions.append(self.vcsUpdateAct)
74 78
75 self.vcsCommitAct = E5Action(self.trUtf8('Commit changes to repository'), 79 self.vcsCommitAct = E5Action(
76 UI.PixmapCache.getIcon("vcsCommit.png"), 80 self.trUtf8('Commit changes to repository'),
77 self.trUtf8('&Commit changes to repository...'), 0, 0, self, 81 UI.PixmapCache.getIcon("vcsCommit.png"),
78 'subversion_commit') 82 self.trUtf8('&Commit changes to repository...'), 0, 0, self,
83 'subversion_commit')
79 self.vcsCommitAct.setStatusTip(self.trUtf8( 84 self.vcsCommitAct.setStatusTip(self.trUtf8(
80 'Commit changes to the local project to the VCS repository' 85 'Commit changes to the local project to the VCS repository'
81 )) 86 ))
82 self.vcsCommitAct.setWhatsThis(self.trUtf8( 87 self.vcsCommitAct.setWhatsThis(self.trUtf8(
83 """<b>Commit changes to repository</b>""" 88 """<b>Commit changes to repository</b>"""
84 """<p>This commits changes to the local project to the VCS repository.</p>""" 89 """<p>This commits changes to the local project to the VCS"""
90 """ repository.</p>"""
85 )) 91 ))
86 self.vcsCommitAct.triggered[()].connect(self._vcsCommit) 92 self.vcsCommitAct.triggered[()].connect(self._vcsCommit)
87 self.actions.append(self.vcsCommitAct) 93 self.actions.append(self.vcsCommitAct)
88 94
89 self.vcsLogAct = E5Action(self.trUtf8('Show log'), 95 self.vcsLogAct = E5Action(self.trUtf8('Show log'),
107 self.svnLogBrowserAct.setStatusTip(self.trUtf8( 113 self.svnLogBrowserAct.setStatusTip(self.trUtf8(
108 'Show a dialog to browse the log of the local project' 114 'Show a dialog to browse the log of the local project'
109 )) 115 ))
110 self.svnLogBrowserAct.setWhatsThis(self.trUtf8( 116 self.svnLogBrowserAct.setWhatsThis(self.trUtf8(
111 """<b>Show log browser</b>""" 117 """<b>Show log browser</b>"""
112 """<p>This shows a dialog to browse the log of the local project.""" 118 """<p>This shows a dialog to browse the log of the local"""
113 """ A limited number of entries is shown first. More can be""" 119 """ project. A limited number of entries is shown first. More"""
114 """ retrieved later on.</p>""" 120 """ can be retrieved later on.</p>"""
115 )) 121 ))
116 self.svnLogBrowserAct.triggered[()].connect(self.__svnLogBrowser) 122 self.svnLogBrowserAct.triggered[()].connect(self.__svnLogBrowser)
117 self.actions.append(self.svnLogBrowserAct) 123 self.actions.append(self.svnLogBrowserAct)
118 124
119 self.vcsDiffAct = E5Action(self.trUtf8('Show difference'), 125 self.vcsDiffAct = E5Action(self.trUtf8('Show difference'),
123 self.vcsDiffAct.setStatusTip(self.trUtf8( 129 self.vcsDiffAct.setStatusTip(self.trUtf8(
124 'Show the difference of the local project to the repository' 130 'Show the difference of the local project to the repository'
125 )) 131 ))
126 self.vcsDiffAct.setWhatsThis(self.trUtf8( 132 self.vcsDiffAct.setWhatsThis(self.trUtf8(
127 """<b>Show difference</b>""" 133 """<b>Show difference</b>"""
128 """<p>This shows the difference of the local project to the repository.</p>""" 134 """<p>This shows the difference of the local project to the"""
135 """ repository.</p>"""
129 )) 136 ))
130 self.vcsDiffAct.triggered[()].connect(self._vcsDiff) 137 self.vcsDiffAct.triggered[()].connect(self._vcsDiff)
131 self.actions.append(self.vcsDiffAct) 138 self.actions.append(self.vcsDiffAct)
132 139
133 self.svnExtDiffAct = E5Action(self.trUtf8('Show difference (extended)'), 140 self.svnExtDiffAct = E5Action(
134 UI.PixmapCache.getIcon("vcsDiff.png"), 141 self.trUtf8('Show difference (extended)'),
135 self.trUtf8('Show difference (extended)'), 142 UI.PixmapCache.getIcon("vcsDiff.png"),
136 0, 0, self, 'subversion_extendeddiff') 143 self.trUtf8('Show difference (extended)'),
144 0, 0, self, 'subversion_extendeddiff')
137 self.svnExtDiffAct.setStatusTip(self.trUtf8( 145 self.svnExtDiffAct.setStatusTip(self.trUtf8(
138 'Show the difference of revisions of the project to the repository' 146 'Show the difference of revisions of the project to the repository'
139 )) 147 ))
140 self.svnExtDiffAct.setWhatsThis(self.trUtf8( 148 self.svnExtDiffAct.setWhatsThis(self.trUtf8(
141 """<b>Show difference (extended)</b>""" 149 """<b>Show difference (extended)</b>"""
142 """<p>This shows the difference of selectable revisions of the project.</p>""" 150 """<p>This shows the difference of selectable revisions of"""
151 """ the project.</p>"""
143 )) 152 ))
144 self.svnExtDiffAct.triggered[()].connect(self.__svnExtendedDiff) 153 self.svnExtDiffAct.triggered[()].connect(self.__svnExtendedDiff)
145 self.actions.append(self.svnExtDiffAct) 154 self.actions.append(self.svnExtDiffAct)
146 155
147 self.svnUrlDiffAct = E5Action(self.trUtf8('Show difference (URLs)'), 156 self.svnUrlDiffAct = E5Action(self.trUtf8('Show difference (URLs)'),
232 self.actions.append(self.vcsExportAct) 241 self.actions.append(self.vcsExportAct)
233 242
234 self.vcsPropsAct = E5Action(self.trUtf8('Command options'), 243 self.vcsPropsAct = E5Action(self.trUtf8('Command options'),
235 self.trUtf8('Command &options...'), 0, 0, self, 244 self.trUtf8('Command &options...'), 0, 0, self,
236 'subversion_options') 245 'subversion_options')
237 self.vcsPropsAct.setStatusTip(self.trUtf8('Show the VCS command options')) 246 self.vcsPropsAct.setStatusTip(self.trUtf8(
247 'Show the VCS command options'))
238 self.vcsPropsAct.setWhatsThis(self.trUtf8( 248 self.vcsPropsAct.setWhatsThis(self.trUtf8(
239 """<b>Command options...</b>""" 249 """<b>Command options...</b>"""
240 """<p>This shows a dialog to edit the VCS command options.</p>""" 250 """<p>This shows a dialog to edit the VCS command options.</p>"""
241 )) 251 ))
242 self.vcsPropsAct.triggered[()].connect(self._vcsCommandOptions) 252 self.vcsPropsAct.triggered[()].connect(self._vcsCommandOptions)
263 self.vcsMergeAct.setStatusTip(self.trUtf8( 273 self.vcsMergeAct.setStatusTip(self.trUtf8(
264 'Merge changes of a tag/revision into the local project' 274 'Merge changes of a tag/revision into the local project'
265 )) 275 ))
266 self.vcsMergeAct.setWhatsThis(self.trUtf8( 276 self.vcsMergeAct.setWhatsThis(self.trUtf8(
267 """<b>Merge</b>""" 277 """<b>Merge</b>"""
268 """<p>This merges changes of a tag/revision into the local project.</p>""" 278 """<p>This merges changes of a tag/revision into the local"""
279 """ project.</p>"""
269 )) 280 ))
270 self.vcsMergeAct.triggered[()].connect(self._vcsMerge) 281 self.vcsMergeAct.triggered[()].connect(self._vcsMerge)
271 self.actions.append(self.vcsMergeAct) 282 self.actions.append(self.vcsMergeAct)
272 283
273 self.vcsSwitchAct = E5Action(self.trUtf8('Switch'), 284 self.vcsSwitchAct = E5Action(self.trUtf8('Switch'),
290 self.vcsResolveAct.setStatusTip(self.trUtf8( 301 self.vcsResolveAct.setStatusTip(self.trUtf8(
291 'Mark all conflicts of the local project as resolved' 302 'Mark all conflicts of the local project as resolved'
292 )) 303 ))
293 self.vcsResolveAct.setWhatsThis(self.trUtf8( 304 self.vcsResolveAct.setWhatsThis(self.trUtf8(
294 """<b>Conflicts resolved</b>""" 305 """<b>Conflicts resolved</b>"""
295 """<p>This marks all conflicts of the local project as resolved.</p>""" 306 """<p>This marks all conflicts of the local project as"""
307 """ resolved.</p>"""
296 )) 308 ))
297 self.vcsResolveAct.triggered[()].connect(self.__svnResolve) 309 self.vcsResolveAct.triggered[()].connect(self.__svnResolve)
298 self.actions.append(self.vcsResolveAct) 310 self.actions.append(self.vcsResolveAct)
299 311
300 self.vcsCleanupAct = E5Action(self.trUtf8('Cleanup'), 312 self.vcsCleanupAct = E5Action(self.trUtf8('Cleanup'),
408 self.svnRelocateAct.setStatusTip(self.trUtf8( 420 self.svnRelocateAct.setStatusTip(self.trUtf8(
409 'Relocate the working copy to a new repository URL' 421 'Relocate the working copy to a new repository URL'
410 )) 422 ))
411 self.svnRelocateAct.setWhatsThis(self.trUtf8( 423 self.svnRelocateAct.setWhatsThis(self.trUtf8(
412 """<b>Relocate</b>""" 424 """<b>Relocate</b>"""
413 """<p>This relocates the working copy to a new repository URL.</p>""" 425 """<p>This relocates the working copy to a new repository"""
426 """ URL.</p>"""
414 )) 427 ))
415 self.svnRelocateAct.triggered[()].connect(self.__svnRelocate) 428 self.svnRelocateAct.triggered[()].connect(self.__svnRelocate)
416 self.actions.append(self.svnRelocateAct) 429 self.actions.append(self.svnRelocateAct)
417 430
418 self.svnRepoBrowserAct = E5Action(self.trUtf8('Repository Browser'), 431 self.svnRepoBrowserAct = E5Action(self.trUtf8('Repository Browser'),
435 self.svnConfigAct.setStatusTip(self.trUtf8( 448 self.svnConfigAct.setStatusTip(self.trUtf8(
436 'Show the configuration dialog with the Subversion page selected' 449 'Show the configuration dialog with the Subversion page selected'
437 )) 450 ))
438 self.svnConfigAct.setWhatsThis(self.trUtf8( 451 self.svnConfigAct.setWhatsThis(self.trUtf8(
439 """<b>Configure</b>""" 452 """<b>Configure</b>"""
440 """<p>Show the configuration dialog with the Subversion page selected.</p>""" 453 """<p>Show the configuration dialog with the Subversion page"""
454 """ selected.</p>"""
441 )) 455 ))
442 self.svnConfigAct.triggered[()].connect(self.__svnConfigure) 456 self.svnConfigAct.triggered[()].connect(self.__svnConfigure)
443 self.actions.append(self.svnConfigAct) 457 self.actions.append(self.svnConfigAct)
444 458
445 def initMenu(self, menu): 459 def initMenu(self, menu):
539 """ 553 """
540 self.vcs.svnListTagBranch(self.project.ppath, False) 554 self.vcs.svnListTagBranch(self.project.ppath, False)
541 555
542 def __svnExtendedDiff(self): 556 def __svnExtendedDiff(self):
543 """ 557 """
544 Private slot used to perform a svn diff with the selection of revisions. 558 Private slot used to perform a svn diff with the selection of
559 revisions.
545 """ 560 """
546 self.vcs.svnExtendedDiff(self.project.ppath) 561 self.vcs.svnExtendedDiff(self.project.ppath)
547 562
548 def __svnUrlDiff(self): 563 def __svnUrlDiff(self):
549 """ 564 """
550 Private slot used to perform a svn diff with the selection of repository URLs. 565 Private slot used to perform a svn diff with the selection of
566 repository URLs.
551 """ 567 """
552 self.vcs.svnUrlDiff(self.project.ppath) 568 self.vcs.svnUrlDiff(self.project.ppath)
553 569
554 def __svnLogBrowser(self): 570 def __svnLogBrowser(self):
555 """ 571 """
577 593
578 def __svnConfigure(self): 594 def __svnConfigure(self):
579 """ 595 """
580 Private slot to open the configuration dialog. 596 Private slot to open the configuration dialog.
581 """ 597 """
582 e5App().getObject("UserInterface").showPreferences("zzz_subversionPage") 598 e5App().getObject("UserInterface")\
599 .showPreferences("zzz_subversionPage")
583 600
584 def __svnChangeLists(self): 601 def __svnChangeLists(self):
585 """ 602 """
586 Private slot used to show a list of change lists. 603 Private slot used to show a list of change lists.
587 """ 604 """

eric ide

mercurial