Project/Project.py

changeset 3302
e92f0dd51979
parent 3190
a9a94491c4fd
child 3345
071afe8be2a1
--- a/Project/Project.py	Sun Feb 23 15:24:28 2014 +0100
+++ b/Project/Project.py	Sun Feb 23 19:20:43 2014 +0100
@@ -2157,12 +2157,15 @@
                         self.setDirty(True)
                         if self.vcs is not None:
                             # edit VCS command options
-                            vcores = E5MessageBox.yesNo(
-                                self.ui,
-                                self.tr("New Project"),
-                                self.tr(
-                                    """Would you like to edit the VCS"""
-                                    """ command options?"""))
+                            if self.vcs.vcsSupportCommandOptions():
+                                vcores = E5MessageBox.yesNo(
+                                    self.ui,
+                                    self.tr("New Project"),
+                                    self.tr(
+                                        """Would you like to edit the VCS"""
+                                        """ command options?"""))
+                            else:
+                                vcores = False
                             if vcores:
                                 from VCS.CommandOptionsDialog import \
                                     VcsCommandOptionsDialog
@@ -2222,12 +2225,15 @@
                 self.setDirty(True)
                 if self.vcs is not None:
                     # edit VCS command options
-                    vcores = E5MessageBox.yesNo(
-                        self.ui,
-                        self.tr("New Project"),
-                        self.tr(
-                            """Would you like to edit the VCS command"""
-                            """ options?"""))
+                    if self.vcs.vcsSupportCommandOptions():
+                        vcores = E5MessageBox.yesNo(
+                            self.ui,
+                            self.tr("New Project"),
+                            self.tr(
+                                """Would you like to edit the VCS command"""
+                                """ options?"""))
+                    else:
+                        vcores = False
                     if vcores:
                         from VCS.CommandOptionsDialog import \
                             VcsCommandOptionsDialog
@@ -4165,11 +4171,12 @@
         
         if vcs and forProject:
             # set the vcs options
-            try:
-                vcsopt = copy.deepcopy(self.pdata["VCSOPTIONS"][0])
-                vcs.vcsSetOptions(vcsopt)
-            except LookupError:
-                pass
+            if vcs.vcsSupportCommandOptions():
+                try:
+                    vcsopt = copy.deepcopy(self.pdata["VCSOPTIONS"][0])
+                    vcs.vcsSetOptions(vcsopt)
+                except LookupError:
+                    pass
             # set vcs specific data
             try:
                 vcsother = copy.deepcopy(self.pdata["VCSOTHERDATA"][0])

eric ide

mercurial