2155 self.pdata["VCS"] = [vcsSystem] |
2155 self.pdata["VCS"] = [vcsSystem] |
2156 self.vcs = self.initVCS() |
2156 self.vcs = self.initVCS() |
2157 self.setDirty(True) |
2157 self.setDirty(True) |
2158 if self.vcs is not None: |
2158 if self.vcs is not None: |
2159 # edit VCS command options |
2159 # edit VCS command options |
2160 vcores = E5MessageBox.yesNo( |
2160 if self.vcs.vcsSupportCommandOptions(): |
2161 self.ui, |
2161 vcores = E5MessageBox.yesNo( |
2162 self.tr("New Project"), |
2162 self.ui, |
2163 self.tr( |
2163 self.tr("New Project"), |
2164 """Would you like to edit the VCS""" |
2164 self.tr( |
2165 """ command options?""")) |
2165 """Would you like to edit the VCS""" |
|
2166 """ command options?""")) |
|
2167 else: |
|
2168 vcores = False |
2166 if vcores: |
2169 if vcores: |
2167 from VCS.CommandOptionsDialog import \ |
2170 from VCS.CommandOptionsDialog import \ |
2168 VcsCommandOptionsDialog |
2171 VcsCommandOptionsDialog |
2169 codlg = VcsCommandOptionsDialog(self.vcs) |
2172 codlg = VcsCommandOptionsDialog(self.vcs) |
2170 if codlg.exec_() == QDialog.Accepted: |
2173 if codlg.exec_() == QDialog.Accepted: |
2220 self.pdata["VCS"] = ['None'] |
2223 self.pdata["VCS"] = ['None'] |
2221 self.vcs = self.initVCS() |
2224 self.vcs = self.initVCS() |
2222 self.setDirty(True) |
2225 self.setDirty(True) |
2223 if self.vcs is not None: |
2226 if self.vcs is not None: |
2224 # edit VCS command options |
2227 # edit VCS command options |
2225 vcores = E5MessageBox.yesNo( |
2228 if self.vcs.vcsSupportCommandOptions(): |
2226 self.ui, |
2229 vcores = E5MessageBox.yesNo( |
2227 self.tr("New Project"), |
2230 self.ui, |
2228 self.tr( |
2231 self.tr("New Project"), |
2229 """Would you like to edit the VCS command""" |
2232 self.tr( |
2230 """ options?""")) |
2233 """Would you like to edit the VCS command""" |
|
2234 """ options?""")) |
|
2235 else: |
|
2236 vcores = False |
2231 if vcores: |
2237 if vcores: |
2232 from VCS.CommandOptionsDialog import \ |
2238 from VCS.CommandOptionsDialog import \ |
2233 VcsCommandOptionsDialog |
2239 VcsCommandOptionsDialog |
2234 codlg = VcsCommandOptionsDialog(self.vcs) |
2240 codlg = VcsCommandOptionsDialog(self.vcs) |
2235 if codlg.exec_() == QDialog.Accepted: |
2241 if codlg.exec_() == QDialog.Accepted: |
4163 else: |
4169 else: |
4164 vcs.vcsInitConfig(self) |
4170 vcs.vcsInitConfig(self) |
4165 |
4171 |
4166 if vcs and forProject: |
4172 if vcs and forProject: |
4167 # set the vcs options |
4173 # set the vcs options |
4168 try: |
4174 if vcs.vcsSupportCommandOptions(): |
4169 vcsopt = copy.deepcopy(self.pdata["VCSOPTIONS"][0]) |
4175 try: |
4170 vcs.vcsSetOptions(vcsopt) |
4176 vcsopt = copy.deepcopy(self.pdata["VCSOPTIONS"][0]) |
4171 except LookupError: |
4177 vcs.vcsSetOptions(vcsopt) |
4172 pass |
4178 except LookupError: |
|
4179 pass |
4173 # set vcs specific data |
4180 # set vcs specific data |
4174 try: |
4181 try: |
4175 vcsother = copy.deepcopy(self.pdata["VCSOTHERDATA"][0]) |
4182 vcsother = copy.deepcopy(self.pdata["VCSOTHERDATA"][0]) |
4176 vcs.vcsSetOtherData(vcsother) |
4183 vcs.vcsSetOtherData(vcsother) |
4177 except LookupError: |
4184 except LookupError: |