VCS/ProjectHelper.py

changeset 3302
e92f0dd51979
parent 3190
a9a94491c4fd
child 3345
071afe8be2a1
diff -r 734353e7d679 -r e92f0dd51979 VCS/ProjectHelper.py
--- a/VCS/ProjectHelper.py	Sun Feb 23 15:24:28 2014 +0100
+++ b/VCS/ProjectHelper.py	Sun Feb 23 19:20:43 2014 +0100
@@ -170,11 +170,15 @@
                 self.project.pdata["VCS"] = [vcsSystem]
                 self.project.vcs = self.project.initVCS(vcsSystem)
                 # edit VCS command options
-                vcores = E5MessageBox.yesNo(
-                    self.parent(),
-                    self.tr("New Project"),
-                    self.tr(
-                        """Would you like to edit the VCS command options?"""))
+                if self.project.vcs.vcsSupportCommandOptions():
+                    vcores = E5MessageBox.yesNo(
+                        self.parent(),
+                        self.tr("New Project"),
+                        self.tr(
+                            """Would you like to edit the VCS command"""
+                            """ options?"""))
+                else:
+                    vcores = False
                 if vcores:
                     from .CommandOptionsDialog import VcsCommandOptionsDialog
                     codlg = VcsCommandOptionsDialog(self.project.vcs)
@@ -350,11 +354,15 @@
             if vcsdlg.exec_() == QDialog.Accepted:
                 vcsDataDict = vcsdlg.getData()
                 # edit VCS command options
-                vcores = E5MessageBox.yesNo(
-                    self.parent(),
-                    self.tr("Import Project"),
-                    self.tr(
-                        """Would you like to edit the VCS command options?"""))
+                if self.project.vcs.vcsSupportCommandOptions():
+                    vcores = E5MessageBox.yesNo(
+                        self.parent(),
+                        self.tr("Import Project"),
+                        self.tr(
+                            """Would you like to edit the VCS command"""
+                            """ options?"""))
+                else:
+                    vcores = False
                 if vcores:
                     from .CommandOptionsDialog import VcsCommandOptionsDialog
                     codlg = VcsCommandOptionsDialog(self.project.vcs)
@@ -427,11 +435,12 @@
         """
         Protected slot to edit the VCS command options.
         """
-        from .CommandOptionsDialog import VcsCommandOptionsDialog
-        codlg = VcsCommandOptionsDialog(self.vcs)
-        if codlg.exec_() == QDialog.Accepted:
-            self.vcs.vcsSetOptions(codlg.getOptions())
-            self.project.setDirty(True)
+        if self.vcs.vcsSupportCommandOptions():
+            from .CommandOptionsDialog import VcsCommandOptionsDialog
+            codlg = VcsCommandOptionsDialog(self.vcs)
+            if codlg.exec_() == QDialog.Accepted:
+                self.vcs.vcsSetOptions(codlg.getOptions())
+                self.project.setDirty(True)
         
     def _vcsLog(self):
         """

eric ide

mercurial