VCS/ProjectHelper.py

changeset 2409
df3820f08247
parent 2302
f29e9405c851
child 2525
8b507a9a2d40
child 3013
fe886b7f8f40
equal deleted inserted replaced
2408:dc3a7c9d8f6e 2409:df3820f08247
11 import shutil 11 import shutil
12 import copy 12 import copy
13 13
14 from PyQt4.QtCore import QDir, QFileInfo, QObject 14 from PyQt4.QtCore import QDir, QFileInfo, QObject
15 from PyQt4.QtGui import QDialog, QInputDialog 15 from PyQt4.QtGui import QDialog, QInputDialog
16
17 from .CommandOptionsDialog import vcsCommandOptionsDialog
18 from .RepositoryInfoDialog import VcsRepositoryInfoDialog
19 16
20 from E5Gui.E5Action import E5Action 17 from E5Gui.E5Action import E5Action
21 from E5Gui import E5MessageBox 18 from E5Gui import E5MessageBox
22 from E5Gui.E5Application import e5App 19 from E5Gui.E5Application import e5App
23 20
167 # edit VCS command options 164 # edit VCS command options
168 vcores = E5MessageBox.yesNo(self.parent(), 165 vcores = E5MessageBox.yesNo(self.parent(),
169 self.trUtf8("New Project"), 166 self.trUtf8("New Project"),
170 self.trUtf8("""Would you like to edit the VCS command options?""")) 167 self.trUtf8("""Would you like to edit the VCS command options?"""))
171 if vcores: 168 if vcores:
169 from .CommandOptionsDialog import vcsCommandOptionsDialog
172 codlg = vcsCommandOptionsDialog(self.project.vcs) 170 codlg = vcsCommandOptionsDialog(self.project.vcs)
173 if codlg.exec_() == QDialog.Accepted: 171 if codlg.exec_() == QDialog.Accepted:
174 self.project.vcs.vcsSetOptions(codlg.getOptions()) 172 self.project.vcs.vcsSetOptions(codlg.getOptions())
175 173
176 # create the project directory if it doesn't exist already 174 # create the project directory if it doesn't exist already
328 # edit VCS command options 326 # edit VCS command options
329 vcores = E5MessageBox.yesNo(self.parent(), 327 vcores = E5MessageBox.yesNo(self.parent(),
330 self.trUtf8("Import Project"), 328 self.trUtf8("Import Project"),
331 self.trUtf8("""Would you like to edit the VCS command options?""")) 329 self.trUtf8("""Would you like to edit the VCS command options?"""))
332 if vcores: 330 if vcores:
331 from .CommandOptionsDialog import vcsCommandOptionsDialog
333 codlg = vcsCommandOptionsDialog(self.project.vcs) 332 codlg = vcsCommandOptionsDialog(self.project.vcs)
334 if codlg.exec_() == QDialog.Accepted: 333 if codlg.exec_() == QDialog.Accepted:
335 self.project.vcs.vcsSetOptions(codlg.getOptions()) 334 self.project.vcs.vcsSetOptions(codlg.getOptions())
336 self.project.setDirty(True) 335 self.project.setDirty(True)
337 self.project.vcs.vcsSetDataFromDict(vcsDataDict) 336 self.project.vcs.vcsSetDataFromDict(vcsDataDict)
394 393
395 def _vcsCommandOptions(self): 394 def _vcsCommandOptions(self):
396 """ 395 """
397 Protected slot to edit the VCS command options. 396 Protected slot to edit the VCS command options.
398 """ 397 """
398 from .CommandOptionsDialog import vcsCommandOptionsDialog
399 codlg = vcsCommandOptionsDialog(self.vcs) 399 codlg = vcsCommandOptionsDialog(self.vcs)
400 if codlg.exec_() == QDialog.Accepted: 400 if codlg.exec_() == QDialog.Accepted:
401 self.vcs.vcsSetOptions(codlg.getOptions()) 401 self.vcs.vcsSetOptions(codlg.getOptions())
402 self.project.setDirty(True) 402 self.project.setDirty(True)
403 403
464 464
465 def _vcsInfoDisplay(self): 465 def _vcsInfoDisplay(self):
466 """ 466 """
467 Protected slot called to show some vcs information. 467 Protected slot called to show some vcs information.
468 """ 468 """
469 from .RepositoryInfoDialog import VcsRepositoryInfoDialog
469 info = self.vcs.vcsRepositoryInfos(self.project.ppath) 470 info = self.vcs.vcsRepositoryInfos(self.project.ppath)
470 dlg = VcsRepositoryInfoDialog(None, info) 471 dlg = VcsRepositoryInfoDialog(None, info)
471 dlg.exec_() 472 dlg.exec_()

eric ide

mercurial