221 return |
221 return |
222 |
222 |
223 vcs = self.project.initVCS(selectedVcsSystem) |
223 vcs = self.project.initVCS(selectedVcsSystem) |
224 if vcs is not None: |
224 if vcs is not None: |
225 vcsdlg = vcs.vcsNewProjectOptionsDialog() |
225 vcsdlg = vcs.vcsNewProjectOptionsDialog() |
226 if vcsdlg.exec_() == QDialog.Accepted: |
226 if vcsdlg.exec() == QDialog.Accepted: |
227 projectdir, vcsDataDict = vcsdlg.getData() |
227 projectdir, vcsDataDict = vcsdlg.getData() |
228 # edit VCS command options |
228 # edit VCS command options |
229 if vcs.vcsSupportCommandOptions(): |
229 if vcs.vcsSupportCommandOptions(): |
230 vcores = E5MessageBox.yesNo( |
230 vcores = E5MessageBox.yesNo( |
231 self.parent(), |
231 self.parent(), |
238 else: |
238 else: |
239 vcores = False |
239 vcores = False |
240 if vcores: |
240 if vcores: |
241 from .CommandOptionsDialog import VcsCommandOptionsDialog |
241 from .CommandOptionsDialog import VcsCommandOptionsDialog |
242 codlg = VcsCommandOptionsDialog(vcs) |
242 codlg = VcsCommandOptionsDialog(vcs) |
243 if codlg.exec_() == QDialog.Accepted: |
243 if codlg.exec() == QDialog.Accepted: |
244 vcs.vcsSetOptions(codlg.getOptions()) |
244 vcs.vcsSetOptions(codlg.getOptions()) |
245 |
245 |
246 # create the project directory if it doesn't exist already |
246 # create the project directory if it doesn't exist already |
247 if not os.path.isdir(projectdir): |
247 if not os.path.isdir(projectdir): |
248 try: |
248 try: |
312 |
312 |
313 from Project.PropertiesDialog import ( |
313 from Project.PropertiesDialog import ( |
314 PropertiesDialog |
314 PropertiesDialog |
315 ) |
315 ) |
316 dlg = PropertiesDialog(self.project, False) |
316 dlg = PropertiesDialog(self.project, False) |
317 if dlg.exec_() == QDialog.Accepted: |
317 if dlg.exec() == QDialog.Accepted: |
318 dlg.storeData() |
318 dlg.storeData() |
319 self.project.initFileTypes() |
319 self.project.initFileTypes() |
320 self.project.pdata["VCS"] = selectedVcsSystem |
320 self.project.pdata["VCS"] = selectedVcsSystem |
321 self.project.setDirty(True) |
321 self.project.setDirty(True) |
322 if self.project.pdata["MAINSCRIPT"]: |
322 if self.project.pdata["MAINSCRIPT"]: |
421 self.project.pdata["VCS"] = selectedVcsSystem |
421 self.project.pdata["VCS"] = selectedVcsSystem |
422 self.project.vcs = self.project.initVCS(selectedVcsSystem) |
422 self.project.vcs = self.project.initVCS(selectedVcsSystem) |
423 if self.project.vcs is not None: |
423 if self.project.vcs is not None: |
424 vcsdlg = self.project.vcs.vcsOptionsDialog( |
424 vcsdlg = self.project.vcs.vcsOptionsDialog( |
425 self.project, self.project.name, 1) |
425 self.project, self.project.name, 1) |
426 if vcsdlg.exec_() == QDialog.Accepted: |
426 if vcsdlg.exec() == QDialog.Accepted: |
427 vcsDataDict = vcsdlg.getData() |
427 vcsDataDict = vcsdlg.getData() |
428 # edit VCS command options |
428 # edit VCS command options |
429 if self.project.vcs.vcsSupportCommandOptions(): |
429 if self.project.vcs.vcsSupportCommandOptions(): |
430 vcores = E5MessageBox.yesNo( |
430 vcores = E5MessageBox.yesNo( |
431 self.parent(), |
431 self.parent(), |
440 if vcores: |
440 if vcores: |
441 from .CommandOptionsDialog import ( |
441 from .CommandOptionsDialog import ( |
442 VcsCommandOptionsDialog |
442 VcsCommandOptionsDialog |
443 ) |
443 ) |
444 codlg = VcsCommandOptionsDialog(self.project.vcs) |
444 codlg = VcsCommandOptionsDialog(self.project.vcs) |
445 if codlg.exec_() == QDialog.Accepted: |
445 if codlg.exec() == QDialog.Accepted: |
446 self.project.vcs.vcsSetOptions(codlg.getOptions()) |
446 self.project.vcs.vcsSetOptions(codlg.getOptions()) |
447 self.project.setDirty(True) |
447 self.project.setDirty(True) |
448 self.project.vcs.vcsSetDataFromDict(vcsDataDict) |
448 self.project.vcs.vcsSetDataFromDict(vcsDataDict) |
449 self.project.saveProject() |
449 self.project.saveProject() |
450 isVcsControlled = self.project.vcs.vcsImport( |
450 isVcsControlled = self.project.vcs.vcsImport( |
517 Protected slot to edit the VCS command options. |
517 Protected slot to edit the VCS command options. |
518 """ |
518 """ |
519 if self.vcs.vcsSupportCommandOptions(): |
519 if self.vcs.vcsSupportCommandOptions(): |
520 from .CommandOptionsDialog import VcsCommandOptionsDialog |
520 from .CommandOptionsDialog import VcsCommandOptionsDialog |
521 codlg = VcsCommandOptionsDialog(self.vcs) |
521 codlg = VcsCommandOptionsDialog(self.vcs) |
522 if codlg.exec_() == QDialog.Accepted: |
522 if codlg.exec() == QDialog.Accepted: |
523 self.vcs.vcsSetOptions(codlg.getOptions()) |
523 self.vcs.vcsSetOptions(codlg.getOptions()) |
524 self.project.setDirty(True) |
524 self.project.setDirty(True) |
525 |
525 |
526 def _vcsLog(self): |
526 def _vcsLog(self): |
527 """ |
527 """ |
602 Protected slot called to show some vcs information. |
602 Protected slot called to show some vcs information. |
603 """ |
603 """ |
604 from .RepositoryInfoDialog import VcsRepositoryInfoDialog |
604 from .RepositoryInfoDialog import VcsRepositoryInfoDialog |
605 info = self.vcs.vcsRepositoryInfos(self.project.ppath) |
605 info = self.vcs.vcsRepositoryInfos(self.project.ppath) |
606 dlg = VcsRepositoryInfoDialog(None, info) |
606 dlg = VcsRepositoryInfoDialog(None, info) |
607 dlg.exec_() |
607 dlg.exec() |