168 if vcsdlg.exec_() == QDialog.Accepted: |
168 if vcsdlg.exec_() == QDialog.Accepted: |
169 projectdir, vcsDataDict = vcsdlg.getData() |
169 projectdir, vcsDataDict = vcsdlg.getData() |
170 self.project.pdata["VCS"] = [vcsSystem] |
170 self.project.pdata["VCS"] = [vcsSystem] |
171 self.project.vcs = self.project.initVCS(vcsSystem) |
171 self.project.vcs = self.project.initVCS(vcsSystem) |
172 # edit VCS command options |
172 # edit VCS command options |
173 vcores = E5MessageBox.yesNo( |
173 if self.project.vcs.vcsSupportCommandOptions(): |
174 self.parent(), |
174 vcores = E5MessageBox.yesNo( |
175 self.tr("New Project"), |
175 self.parent(), |
176 self.tr( |
176 self.tr("New Project"), |
177 """Would you like to edit the VCS command options?""")) |
177 self.tr( |
|
178 """Would you like to edit the VCS command""" |
|
179 """ options?""")) |
|
180 else: |
|
181 vcores = False |
178 if vcores: |
182 if vcores: |
179 from .CommandOptionsDialog import VcsCommandOptionsDialog |
183 from .CommandOptionsDialog import VcsCommandOptionsDialog |
180 codlg = VcsCommandOptionsDialog(self.project.vcs) |
184 codlg = VcsCommandOptionsDialog(self.project.vcs) |
181 if codlg.exec_() == QDialog.Accepted: |
185 if codlg.exec_() == QDialog.Accepted: |
182 self.project.vcs.vcsSetOptions(codlg.getOptions()) |
186 self.project.vcs.vcsSetOptions(codlg.getOptions()) |
348 vcsdlg = self.project.vcs.vcsOptionsDialog(self.project, |
352 vcsdlg = self.project.vcs.vcsOptionsDialog(self.project, |
349 self.project.name, 1) |
353 self.project.name, 1) |
350 if vcsdlg.exec_() == QDialog.Accepted: |
354 if vcsdlg.exec_() == QDialog.Accepted: |
351 vcsDataDict = vcsdlg.getData() |
355 vcsDataDict = vcsdlg.getData() |
352 # edit VCS command options |
356 # edit VCS command options |
353 vcores = E5MessageBox.yesNo( |
357 if self.project.vcs.vcsSupportCommandOptions(): |
354 self.parent(), |
358 vcores = E5MessageBox.yesNo( |
355 self.tr("Import Project"), |
359 self.parent(), |
356 self.tr( |
360 self.tr("Import Project"), |
357 """Would you like to edit the VCS command options?""")) |
361 self.tr( |
|
362 """Would you like to edit the VCS command""" |
|
363 """ options?""")) |
|
364 else: |
|
365 vcores = False |
358 if vcores: |
366 if vcores: |
359 from .CommandOptionsDialog import VcsCommandOptionsDialog |
367 from .CommandOptionsDialog import VcsCommandOptionsDialog |
360 codlg = VcsCommandOptionsDialog(self.project.vcs) |
368 codlg = VcsCommandOptionsDialog(self.project.vcs) |
361 if codlg.exec_() == QDialog.Accepted: |
369 if codlg.exec_() == QDialog.Accepted: |
362 self.project.vcs.vcsSetOptions(codlg.getOptions()) |
370 self.project.vcs.vcsSetOptions(codlg.getOptions()) |
425 |
433 |
426 def _vcsCommandOptions(self): |
434 def _vcsCommandOptions(self): |
427 """ |
435 """ |
428 Protected slot to edit the VCS command options. |
436 Protected slot to edit the VCS command options. |
429 """ |
437 """ |
430 from .CommandOptionsDialog import VcsCommandOptionsDialog |
438 if self.vcs.vcsSupportCommandOptions(): |
431 codlg = VcsCommandOptionsDialog(self.vcs) |
439 from .CommandOptionsDialog import VcsCommandOptionsDialog |
432 if codlg.exec_() == QDialog.Accepted: |
440 codlg = VcsCommandOptionsDialog(self.vcs) |
433 self.vcs.vcsSetOptions(codlg.getOptions()) |
441 if codlg.exec_() == QDialog.Accepted: |
434 self.project.setDirty(True) |
442 self.vcs.vcsSetOptions(codlg.getOptions()) |
|
443 self.project.setDirty(True) |
435 |
444 |
436 def _vcsLog(self): |
445 def _vcsLog(self): |
437 """ |
446 """ |
438 Protected slot used to show the log of the local project. |
447 Protected slot used to show the log of the local project. |
439 """ |
448 """ |