Plugins/VcsPlugins/vcsPySvn/ProjectHelper.py

changeset 945
8cd4d08fa9f6
parent 791
9ec2ac20e54e
child 1112
8a7d1b9d18db
equal deleted inserted replaced
944:1b59c4ba121e 945:8cd4d08fa9f6
17 from VCS.ProjectHelper import VcsProjectHelper 17 from VCS.ProjectHelper import VcsProjectHelper
18 18
19 from E5Gui.E5Action import E5Action 19 from E5Gui.E5Action import E5Action
20 20
21 import UI.PixmapCache 21 import UI.PixmapCache
22
22 23
23 class SvnProjectHelper(VcsProjectHelper): 24 class SvnProjectHelper(VcsProjectHelper):
24 """ 25 """
25 Class implementing the VCS project helper for Subversion. 26 Class implementing the VCS project helper for Subversion.
26 """ 27 """
27 def __init__(self, vcsObject, projectObject, parent = None, name = None): 28 def __init__(self, vcsObject, projectObject, parent=None, name=None):
28 """ 29 """
29 Constructor 30 Constructor
30 31
31 @param vcsObject reference to the vcs object 32 @param vcsObject reference to the vcs object
32 @param projectObject reference to the project object 33 @param projectObject reference to the project object
216 """<p>This shows the status of the local project.</p>""" 217 """<p>This shows the status of the local project.</p>"""
217 )) 218 ))
218 self.vcsStatusAct.triggered[()].connect(self._vcsStatus) 219 self.vcsStatusAct.triggered[()].connect(self._vcsStatus)
219 self.actions.append(self.vcsStatusAct) 220 self.actions.append(self.vcsStatusAct)
220 221
221 self.svnRepoInfoAct = E5Action(self.trUtf8('Show repository info'), 222 self.svnRepoInfoAct = E5Action(self.trUtf8('Show repository info'),
222 UI.PixmapCache.getIcon("vcsRepo.png"), 223 UI.PixmapCache.getIcon("vcsRepo.png"),
223 self.trUtf8('Show repository info'), 224 self.trUtf8('Show repository info'),
224 0, 0, self, 'subversion_repoinfo') 225 0, 0, self, 'subversion_repoinfo')
225 self.svnRepoInfoAct.setStatusTip(self.trUtf8( 226 self.svnRepoInfoAct.setStatusTip(self.trUtf8(
226 'Show some repository related information for the local project' 227 'Show some repository related information for the local project'
231 """ the local project.</p>""" 232 """ the local project.</p>"""
232 )) 233 ))
233 self.svnRepoInfoAct.triggered[()].connect(self.__svnInfo) 234 self.svnRepoInfoAct.triggered[()].connect(self.__svnInfo)
234 self.actions.append(self.svnRepoInfoAct) 235 self.actions.append(self.svnRepoInfoAct)
235 236
236 self.vcsTagAct = E5Action(self.trUtf8('Tag in repository'), 237 self.vcsTagAct = E5Action(self.trUtf8('Tag in repository'),
237 UI.PixmapCache.getIcon("vcsTag.png"), 238 UI.PixmapCache.getIcon("vcsTag.png"),
238 self.trUtf8('&Tag in repository...'), 239 self.trUtf8('&Tag in repository...'),
239 0, 0, self, 'subversion_tag') 240 0, 0, self, 'subversion_tag')
240 self.vcsTagAct.setStatusTip(self.trUtf8( 241 self.vcsTagAct.setStatusTip(self.trUtf8(
241 'Tag the local project in the repository' 242 'Tag the local project in the repository'
245 """<p>This tags the local project in the repository.</p>""" 246 """<p>This tags the local project in the repository.</p>"""
246 )) 247 ))
247 self.vcsTagAct.triggered[()].connect(self._vcsTag) 248 self.vcsTagAct.triggered[()].connect(self._vcsTag)
248 self.actions.append(self.vcsTagAct) 249 self.actions.append(self.vcsTagAct)
249 250
250 self.vcsExportAct = E5Action(self.trUtf8('Export from repository'), 251 self.vcsExportAct = E5Action(self.trUtf8('Export from repository'),
251 UI.PixmapCache.getIcon("vcsExport.png"), 252 UI.PixmapCache.getIcon("vcsExport.png"),
252 self.trUtf8('&Export from repository...'), 253 self.trUtf8('&Export from repository...'),
253 0, 0, self, 'subversion_export') 254 0, 0, self, 'subversion_export')
254 self.vcsExportAct.setStatusTip(self.trUtf8( 255 self.vcsExportAct.setStatusTip(self.trUtf8(
255 'Export a project from the repository' 256 'Export a project from the repository'
260 )) 261 ))
261 self.vcsExportAct.triggered[()].connect(self._vcsExport) 262 self.vcsExportAct.triggered[()].connect(self._vcsExport)
262 self.actions.append(self.vcsExportAct) 263 self.actions.append(self.vcsExportAct)
263 264
264 self.vcsPropsAct = E5Action(self.trUtf8('Command options'), 265 self.vcsPropsAct = E5Action(self.trUtf8('Command options'),
265 self.trUtf8('Command &options...'),0,0,self, 266 self.trUtf8('Command &options...'), 0, 0, self,
266 'subversion_options') 267 'subversion_options')
267 self.vcsPropsAct.setStatusTip(self.trUtf8('Show the VCS command options')) 268 self.vcsPropsAct.setStatusTip(self.trUtf8('Show the VCS command options'))
268 self.vcsPropsAct.setWhatsThis(self.trUtf8( 269 self.vcsPropsAct.setWhatsThis(self.trUtf8(
269 """<b>Command options...</b>""" 270 """<b>Command options...</b>"""
270 """<p>This shows a dialog to edit the VCS command options.</p>""" 271 """<p>This shows a dialog to edit the VCS command options.</p>"""
351 """<p>This opens a dialog to enter an arbitrary VCS command.</p>""" 352 """<p>This opens a dialog to enter an arbitrary VCS command.</p>"""
352 )) 353 ))
353 self.vcsCommandAct.triggered[()].connect(self._vcsCommand) 354 self.vcsCommandAct.triggered[()].connect(self._vcsCommand)
354 self.actions.append(self.vcsCommandAct) 355 self.actions.append(self.vcsCommandAct)
355 356
356 self.svnTagListAct = E5Action(self.trUtf8('List tags'), 357 self.svnTagListAct = E5Action(self.trUtf8('List tags'),
357 self.trUtf8('List tags...'), 358 self.trUtf8('List tags...'),
358 0, 0, self, 'subversion_list_tags') 359 0, 0, self, 'subversion_list_tags')
359 self.svnTagListAct.setStatusTip(self.trUtf8( 360 self.svnTagListAct.setStatusTip(self.trUtf8(
360 'List tags of the project' 361 'List tags of the project'
361 )) 362 ))
364 """<p>This lists the tags of the project.</p>""" 365 """<p>This lists the tags of the project.</p>"""
365 )) 366 ))
366 self.svnTagListAct.triggered[()].connect(self.__svnTagList) 367 self.svnTagListAct.triggered[()].connect(self.__svnTagList)
367 self.actions.append(self.svnTagListAct) 368 self.actions.append(self.svnTagListAct)
368 369
369 self.svnBranchListAct = E5Action(self.trUtf8('List branches'), 370 self.svnBranchListAct = E5Action(self.trUtf8('List branches'),
370 self.trUtf8('List branches...'), 371 self.trUtf8('List branches...'),
371 0, 0, self, 'subversion_list_branches') 372 0, 0, self, 'subversion_list_branches')
372 self.svnBranchListAct.setStatusTip(self.trUtf8( 373 self.svnBranchListAct.setStatusTip(self.trUtf8(
373 'List branches of the project' 374 'List branches of the project'
374 )) 375 ))
377 """<p>This lists the branches of the project.</p>""" 378 """<p>This lists the branches of the project.</p>"""
378 )) 379 ))
379 self.svnBranchListAct.triggered[()].connect(self.__svnBranchList) 380 self.svnBranchListAct.triggered[()].connect(self.__svnBranchList)
380 self.actions.append(self.svnBranchListAct) 381 self.actions.append(self.svnBranchListAct)
381 382
382 self.svnListAct = E5Action(self.trUtf8('List repository contents'), 383 self.svnListAct = E5Action(self.trUtf8('List repository contents'),
383 self.trUtf8('List repository contents...'), 384 self.trUtf8('List repository contents...'),
384 0, 0, self, 'subversion_contents') 385 0, 0, self, 'subversion_contents')
385 self.svnListAct.setStatusTip(self.trUtf8( 386 self.svnListAct.setStatusTip(self.trUtf8(
386 'Lists the contents of the repository' 387 'Lists the contents of the repository'
387 )) 388 ))
480 """ 481 """
481 menu.clear() 482 menu.clear()
482 483
483 act = menu.addAction( 484 act = menu.addAction(
484 UI.PixmapCache.getIcon( 485 UI.PixmapCache.getIcon(
485 os.path.join("VcsPlugins", "vcsPySvn", "icons", "pysvn.png")), 486 os.path.join("VcsPlugins", "vcsPySvn", "icons", "pysvn.png")),
486 self.vcs.vcsName(), self._vcsInfoDisplay) 487 self.vcs.vcsName(), self._vcsInfoDisplay)
487 font = act.font() 488 font = act.font()
488 font.setBold(True) 489 font.setBold(True)
489 act.setFont(font) 490 act.setFont(font)
490 menu.addSeparator() 491 menu.addSeparator()
610 611
611 def __svnRepoBrowser(self): 612 def __svnRepoBrowser(self):
612 """ 613 """
613 Private slot to open the repository browser. 614 Private slot to open the repository browser.
614 """ 615 """
615 self.vcs.svnRepoBrowser(projectPath = self.project.ppath) 616 self.vcs.svnRepoBrowser(projectPath=self.project.ppath)
616 617
617 def __svnConfigure(self): 618 def __svnConfigure(self):
618 """ 619 """
619 Private method to open the configuration dialog. 620 Private method to open the configuration dialog.
620 """ 621 """

eric ide

mercurial