VCS/VersionControl.py

changeset 6529
1c2968f124b7
parent 6048
82ad8ec9548c
child 6645
ad476851d7e0
diff -r 3e194fec0eaa -r 1c2968f124b7 VCS/VersionControl.py
--- a/VCS/VersionControl.py	Wed Oct 03 14:31:58 2018 +0200
+++ b/VCS/VersionControl.py	Wed Oct 03 17:33:40 2018 +0200
@@ -32,11 +32,14 @@
     @signal vcsStatusMonitorData(list of str) emitted to update the VCS status
     @signal vcsStatusMonitorStatus(str, str) emitted to signal the status of
         the monitoring thread (ok, nok, op, off) and a status message
+    @signal vcsStatusMonitorInfo(str) emitted to signal some info of the
+        monitoring thread
     @signal vcsStatusChanged() emitted to indicate a change of the overall
         VCS status
     """
     vcsStatusMonitorData = pyqtSignal(list)
     vcsStatusMonitorStatus = pyqtSignal(str, str)
+    vcsStatusMonitorInfo = pyqtSignal(str)
     vcsStatusChanged = pyqtSignal()
     
     canBeCommitted = 1  # Indicates that a file/directory is in the vcs.
@@ -628,12 +631,14 @@
     
     def __statusMonitorStatus(self, status, statusMsg):
         """
-        Private method to receive the status monitor status.
+        Private slot to receive the status monitor status.
+        
+        It simply re-emits the received status.
         
-        It simply reemits the received status.
-        
-        @param status status of the monitoring thread (string, ok, nok or off)
-        @param statusMsg explanotory text for the signaled status (string)
+        @param status status of the monitoring thread
+        @type str (one of ok, nok or off)
+        @param statusMsg explanotory text for the signaled status
+        @type str
         """
         self.vcsStatusMonitorStatus.emit(status, statusMsg)
         QApplication.flush()
@@ -642,13 +647,26 @@
         """
         Private method to receive the status monitor status.
         
-        It simply reemits the received status list.
+        It simply re-emits the received status list.
         
-        @param statusList list of status records (list of strings)
+        @param statusList list of status records
+        @type list of str
         """
         self.vcsStatusMonitorData.emit(statusList)
         QApplication.flush()
-
+    
+    def __statusMonitorInfo(self, info):
+        """
+        Private slot to receive the status monitor info message.
+        
+        It simply re-emits the received info message.
+        
+        @param info received info message
+        @type str
+        """
+        self.vcsStatusMonitorInfo.emit(info)
+        QApplication.flush()
+    
     def startStatusMonitor(self, project):
         """
         Public method to start the VCS status monitor thread.
@@ -670,6 +688,8 @@
                     self.__statusMonitorData, Qt.QueuedConnection)
                 self.statusMonitorThread.vcsStatusMonitorStatus.connect(
                     self.__statusMonitorStatus, Qt.QueuedConnection)
+                self.statusMonitorThread.vcsStatusMonitorInfo.connect(
+                    self.__statusMonitorInfo, Qt.QueuedConnection)
                 self.statusMonitorThread.setAutoUpdate(
                     Preferences.getVCS("AutoUpdate"))
                 self.statusMonitorThread.start()
@@ -687,6 +707,8 @@
                 self.__statusMonitorData)
             self.statusMonitorThread.vcsStatusMonitorStatus.disconnect(
                 self.__statusMonitorStatus)
+            self.statusMonitorThread.vcsStatusMonitorInfo.disconnect(
+                self.__statusMonitorInfo)
             self.statusMonitorThread.stop()
             self.statusMonitorThread.wait(10000)
             if not self.statusMonitorThread.isFinished():
@@ -698,6 +720,7 @@
                 QCoreApplication.translate(
                     "VersionControl",
                     "Repository status checking is switched off"))
+            self.__statusMonitorInfo("")
     
     def setStatusMonitorInterval(self, interval, project):
         """

eric ide

mercurial