Plugins/VcsPlugins/vcsMercurial/ProjectHelper.py

changeset 6467
56ef1ae1629d
parent 6461
48bf6c3f084f
child 6645
ad476851d7e0
diff -r dac80ad0de75 -r 56ef1ae1629d Plugins/VcsPlugins/vcsMercurial/ProjectHelper.py
--- a/Plugins/VcsPlugins/vcsMercurial/ProjectHelper.py	Sat Aug 04 15:47:11 2018 +0200
+++ b/Plugins/VcsPlugins/vcsMercurial/ProjectHelper.py	Sat Aug 04 16:03:13 2018 +0200
@@ -93,6 +93,10 @@
             self.actions.append(self.hgBookmarkPushCurrentAct)
             self.__toolbarManager.addAction(self.hgBookmarkPushCurrentAct,
                                             title)
+        
+        if self.vcs.version < (4, 7, 0):
+            self.hgGraftStopAct.setEnabled(False)
+            self.hgGraftAbortAct.setEnabled(False)
     
     def getProject(self):
         """
@@ -1003,35 +1007,34 @@
         self.hgGraftContinueAct.triggered.connect(self.__hgGraftContinue)
         self.actions.append(self.hgGraftContinueAct)
         
-        if self.vcs.version >= (4, 7, 0):
-            self.hgGraftStopAct = E5Action(
-                self.tr('Stop Copying Session'),
-                self.tr('Stop Copying Session'),
-                0, 0, self, 'mercurial_graft_stop')
-            self.hgGraftStopAct.setStatusTip(self.tr(
-                'Stop the interrupted copying session'
-            ))
-            self.hgGraftStopAct.setWhatsThis(self.tr(
-                """<b>Stop Copying Session</b>"""
-                """<p>This stops the interrupted copying session.</p>"""
-            ))
-            self.hgGraftStopAct.triggered.connect(self.__hgGraftStop)
-            self.actions.append(self.hgGraftStopAct)
-            
-            self.hgGraftAbortAct = E5Action(
-                self.tr('Abort Copying Session'),
-                self.tr('Abort Copying Session'),
-                0, 0, self, 'mercurial_graft_abort')
-            self.hgGraftAbortAct.setStatusTip(self.tr(
-                'Abort the interrupted copying session and rollback'
-            ))
-            self.hgGraftAbortAct.setWhatsThis(self.tr(
-                """<b>Abort Copying Session</b>"""
-                """<p>This aborts the interrupted copying session and"""
-                """ rollbacks to the state before the copy.</p>"""
-            ))
-            self.hgGraftAbortAct.triggered.connect(self.__hgGraftAbort)
-            self.actions.append(self.hgGraftAbortAct)
+        self.hgGraftStopAct = E5Action(
+            self.tr('Stop Copying Session'),
+            self.tr('Stop Copying Session'),
+            0, 0, self, 'mercurial_graft_stop')
+        self.hgGraftStopAct.setStatusTip(self.tr(
+            'Stop the interrupted copying session'
+        ))
+        self.hgGraftStopAct.setWhatsThis(self.tr(
+            """<b>Stop Copying Session</b>"""
+            """<p>This stops the interrupted copying session.</p>"""
+        ))
+        self.hgGraftStopAct.triggered.connect(self.__hgGraftStop)
+        self.actions.append(self.hgGraftStopAct)
+        
+        self.hgGraftAbortAct = E5Action(
+            self.tr('Abort Copying Session'),
+            self.tr('Abort Copying Session'),
+            0, 0, self, 'mercurial_graft_abort')
+        self.hgGraftAbortAct.setStatusTip(self.tr(
+            'Abort the interrupted copying session and rollback'
+        ))
+        self.hgGraftAbortAct.setWhatsThis(self.tr(
+            """<b>Abort Copying Session</b>"""
+            """<p>This aborts the interrupted copying session and"""
+            """ rollbacks to the state before the copy.</p>"""
+        ))
+        self.hgGraftAbortAct.triggered.connect(self.__hgGraftAbort)
+        self.actions.append(self.hgGraftAbortAct)
         
         self.hgAddSubrepoAct = E5Action(
             self.tr('Add'),

eric ide

mercurial