Plugins/VcsPlugins/vcsSubversion/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.vcsTagAct = E5Action(self.trUtf8('Tag in repository'), 222 self.vcsTagAct = E5Action(self.trUtf8('Tag in repository'),
222 UI.PixmapCache.getIcon("vcsTag.png"), 223 UI.PixmapCache.getIcon("vcsTag.png"),
223 self.trUtf8('&Tag in repository...'), 224 self.trUtf8('&Tag in repository...'),
224 0, 0, self, 'subversion_tag') 225 0, 0, self, 'subversion_tag')
225 self.vcsTagAct.setStatusTip(self.trUtf8( 226 self.vcsTagAct.setStatusTip(self.trUtf8(
226 'Tag the local project in the repository' 227 'Tag the local project in the repository'
230 """<p>This tags the local project in the repository.</p>""" 231 """<p>This tags the local project in the repository.</p>"""
231 )) 232 ))
232 self.vcsTagAct.triggered[()].connect(self._vcsTag) 233 self.vcsTagAct.triggered[()].connect(self._vcsTag)
233 self.actions.append(self.vcsTagAct) 234 self.actions.append(self.vcsTagAct)
234 235
235 self.vcsExportAct = E5Action(self.trUtf8('Export from repository'), 236 self.vcsExportAct = E5Action(self.trUtf8('Export from repository'),
236 UI.PixmapCache.getIcon("vcsExport.png"), 237 UI.PixmapCache.getIcon("vcsExport.png"),
237 self.trUtf8('&Export from repository...'), 238 self.trUtf8('&Export from repository...'),
238 0, 0, self, 'subversion_export') 239 0, 0, self, 'subversion_export')
239 self.vcsExportAct.setStatusTip(self.trUtf8( 240 self.vcsExportAct.setStatusTip(self.trUtf8(
240 'Export a project from the repository' 241 'Export a project from the repository'
245 )) 246 ))
246 self.vcsExportAct.triggered[()].connect(self._vcsExport) 247 self.vcsExportAct.triggered[()].connect(self._vcsExport)
247 self.actions.append(self.vcsExportAct) 248 self.actions.append(self.vcsExportAct)
248 249
249 self.vcsPropsAct = E5Action(self.trUtf8('Command options'), 250 self.vcsPropsAct = E5Action(self.trUtf8('Command options'),
250 self.trUtf8('Command &options...'),0,0,self, 251 self.trUtf8('Command &options...'), 0, 0, self,
251 'subversion_options') 252 'subversion_options')
252 self.vcsPropsAct.setStatusTip(self.trUtf8('Show the VCS command options')) 253 self.vcsPropsAct.setStatusTip(self.trUtf8('Show the VCS command options'))
253 self.vcsPropsAct.setWhatsThis(self.trUtf8( 254 self.vcsPropsAct.setWhatsThis(self.trUtf8(
254 """<b>Command options...</b>""" 255 """<b>Command options...</b>"""
255 """<p>This shows a dialog to edit the VCS command options.</p>""" 256 """<p>This shows a dialog to edit the VCS command options.</p>"""
336 """<p>This opens a dialog to enter an arbitrary VCS command.</p>""" 337 """<p>This opens a dialog to enter an arbitrary VCS command.</p>"""
337 )) 338 ))
338 self.vcsCommandAct.triggered[()].connect(self._vcsCommand) 339 self.vcsCommandAct.triggered[()].connect(self._vcsCommand)
339 self.actions.append(self.vcsCommandAct) 340 self.actions.append(self.vcsCommandAct)
340 341
341 self.svnTagListAct = E5Action(self.trUtf8('List tags'), 342 self.svnTagListAct = E5Action(self.trUtf8('List tags'),
342 self.trUtf8('List tags...'), 343 self.trUtf8('List tags...'),
343 0, 0, self, 'subversion_list_tags') 344 0, 0, self, 'subversion_list_tags')
344 self.svnTagListAct.setStatusTip(self.trUtf8( 345 self.svnTagListAct.setStatusTip(self.trUtf8(
345 'List tags of the project' 346 'List tags of the project'
346 )) 347 ))
349 """<p>This lists the tags of the project.</p>""" 350 """<p>This lists the tags of the project.</p>"""
350 )) 351 ))
351 self.svnTagListAct.triggered[()].connect(self.__svnTagList) 352 self.svnTagListAct.triggered[()].connect(self.__svnTagList)
352 self.actions.append(self.svnTagListAct) 353 self.actions.append(self.svnTagListAct)
353 354
354 self.svnBranchListAct = E5Action(self.trUtf8('List branches'), 355 self.svnBranchListAct = E5Action(self.trUtf8('List branches'),
355 self.trUtf8('List branches...'), 356 self.trUtf8('List branches...'),
356 0, 0, self, 'subversion_list_branches') 357 0, 0, self, 'subversion_list_branches')
357 self.svnBranchListAct.setStatusTip(self.trUtf8( 358 self.svnBranchListAct.setStatusTip(self.trUtf8(
358 'List branches of the project' 359 'List branches of the project'
359 )) 360 ))
362 """<p>This lists the branches of the project.</p>""" 363 """<p>This lists the branches of the project.</p>"""
363 )) 364 ))
364 self.svnBranchListAct.triggered[()].connect(self.__svnBranchList) 365 self.svnBranchListAct.triggered[()].connect(self.__svnBranchList)
365 self.actions.append(self.svnBranchListAct) 366 self.actions.append(self.svnBranchListAct)
366 367
367 self.svnListAct = E5Action(self.trUtf8('List repository contents'), 368 self.svnListAct = E5Action(self.trUtf8('List repository contents'),
368 self.trUtf8('List repository contents...'), 369 self.trUtf8('List repository contents...'),
369 0, 0, self, 'subversion_contents') 370 0, 0, self, 'subversion_contents')
370 self.svnListAct.setStatusTip(self.trUtf8( 371 self.svnListAct.setStatusTip(self.trUtf8(
371 'Lists the contents of the repository' 372 'Lists the contents of the repository'
372 )) 373 ))
465 """ 466 """
466 menu.clear() 467 menu.clear()
467 468
468 act = menu.addAction( 469 act = menu.addAction(
469 UI.PixmapCache.getIcon( 470 UI.PixmapCache.getIcon(
470 os.path.join("VcsPlugins", "vcsSubversion", "icons", "subversion.png")), 471 os.path.join("VcsPlugins", "vcsSubversion", "icons", "subversion.png")),
471 self.vcs.vcsName(), self._vcsInfoDisplay) 472 self.vcs.vcsName(), self._vcsInfoDisplay)
472 font = act.font() 473 font = act.font()
473 font.setBold(True) 474 font.setBold(True)
474 act.setFont(font) 475 act.setFont(font)
475 menu.addSeparator() 476 menu.addSeparator()
589 590
590 def __svnRepoBrowser(self): 591 def __svnRepoBrowser(self):
591 """ 592 """
592 Private slot to open the repository browser. 593 Private slot to open the repository browser.
593 """ 594 """
594 self.vcs.svnRepoBrowser(projectPath = self.project.ppath) 595 self.vcs.svnRepoBrowser(projectPath=self.project.ppath)
595 596
596 def __svnConfigure(self): 597 def __svnConfigure(self):
597 """ 598 """
598 Private method to open the configuration dialog. 599 Private method to open the configuration dialog.
599 """ 600 """

eric ide

mercurial