src/eric7/VCS/ProjectHelper.py

branch
eric7
changeset 9482
a2bc06a54d9d
parent 9473
3f23dbf37dbe
child 9514
2b104ad132a4
equal deleted inserted replaced
9481:0b936ff1bbb9 9482:a2bc06a54d9d
18 from eric7 import Preferences 18 from eric7 import Preferences
19 from eric7.EricGui import EricPixmapCache 19 from eric7.EricGui import EricPixmapCache
20 from eric7.EricGui.EricAction import EricAction 20 from eric7.EricGui.EricAction import EricAction
21 from eric7.EricWidgets import EricMessageBox 21 from eric7.EricWidgets import EricMessageBox
22 from eric7.EricWidgets.EricApplication import ericApp 22 from eric7.EricWidgets.EricApplication import ericApp
23 from eric7.Project.PropertiesDialog import PropertiesDialog
23 from eric7.UI import Config 24 from eric7.UI import Config
25
26 from .CommandOptionsDialog import VcsCommandOptionsDialog
24 27
25 28
26 class VcsProjectHelper(QObject): 29 class VcsProjectHelper(QObject):
27 """ 30 """
28 Class implementing the base class of the VCS project helper. 31 Class implementing the base class of the VCS project helper.
258 ), 261 ),
259 ) 262 )
260 else: 263 else:
261 vcores = False 264 vcores = False
262 if vcores: 265 if vcores:
263 from .CommandOptionsDialog import VcsCommandOptionsDialog
264
265 codlg = VcsCommandOptionsDialog(vcs) 266 codlg = VcsCommandOptionsDialog(vcs)
266 if codlg.exec() == QDialog.DialogCode.Accepted: 267 if codlg.exec() == QDialog.DialogCode.Accepted:
267 vcs.vcsSetOptions(codlg.getOptions()) 268 vcs.vcsSetOptions(codlg.getOptions())
268 269
269 # create the project directory if it doesn't exist already 270 # create the project directory if it doesn't exist already
339 ) 340 )
340 if res: 341 if res:
341 self.project.ppath = projectdir 342 self.project.ppath = projectdir
342 self.project.opened = True 343 self.project.opened = True
343 344
344 from eric7.Project.PropertiesDialog import PropertiesDialog
345
346 dlg = PropertiesDialog(self.project, False) 345 dlg = PropertiesDialog(self.project, False)
347 if dlg.exec() == QDialog.DialogCode.Accepted: 346 if dlg.exec() == QDialog.DialogCode.Accepted:
348 dlg.storeData() 347 dlg.storeData()
349 self.project.initFileTypes() 348 self.project.initFileTypes()
350 self.project.pdata["VCS"] = selectedVcsSystem 349 self.project.pdata["VCS"] = selectedVcsSystem
482 ), 481 ),
483 ) 482 )
484 else: 483 else:
485 vcores = False 484 vcores = False
486 if vcores: 485 if vcores:
487 from .CommandOptionsDialog import VcsCommandOptionsDialog
488
489 codlg = VcsCommandOptionsDialog(self.project.vcs) 486 codlg = VcsCommandOptionsDialog(self.project.vcs)
490 if codlg.exec() == QDialog.DialogCode.Accepted: 487 if codlg.exec() == QDialog.DialogCode.Accepted:
491 self.project.vcs.vcsSetOptions(codlg.getOptions()) 488 self.project.vcs.vcsSetOptions(codlg.getOptions())
492 self.project.setDirty(True) 489 self.project.setDirty(True)
493 self.project.vcs.vcsSetDataFromDict(vcsDataDict) 490 self.project.vcs.vcsSetDataFromDict(vcsDataDict)
580 if self.vcs is None: 577 if self.vcs is None:
581 # just in case 578 # just in case
582 return 579 return
583 580
584 if self.vcs.vcsSupportCommandOptions(): 581 if self.vcs.vcsSupportCommandOptions():
585 from .CommandOptionsDialog import VcsCommandOptionsDialog
586
587 codlg = VcsCommandOptionsDialog(self.vcs) 582 codlg = VcsCommandOptionsDialog(self.vcs)
588 if codlg.exec() == QDialog.DialogCode.Accepted: 583 if codlg.exec() == QDialog.DialogCode.Accepted:
589 self.vcs.vcsSetOptions(codlg.getOptions()) 584 self.vcs.vcsSetOptions(codlg.getOptions())
590 self.project.setDirty(True) 585 self.project.setDirty(True)
591 586
695 690
696 def _vcsInfoDisplay(self): 691 def _vcsInfoDisplay(self):
697 """ 692 """
698 Protected slot called to show some vcs information. 693 Protected slot called to show some vcs information.
699 """ 694 """
700 if self.vcs is None:
701 # just in case
702 return
703
704 from .RepositoryInfoDialog import VcsRepositoryInfoDialog 695 from .RepositoryInfoDialog import VcsRepositoryInfoDialog
696
697 if self.vcs is None:
698 # just in case
699 return
705 700
706 info = self.vcs.vcsRepositoryInfos(self.project.ppath) 701 info = self.vcs.vcsRepositoryInfos(self.project.ppath)
707 dlg = VcsRepositoryInfoDialog(None, info) 702 dlg = VcsRepositoryInfoDialog(None, info)
708 dlg.exec() 703 dlg.exec()

eric ide

mercurial