Yuya Nishihara  committed c12eeb6

status: show error dialog on refresh failure (closes #1867)

It's hard to notice error message shown on status bar.

Since refthread.showMessage is emitted only once, it's safe to open modal
dialog on showMessage. Also, it can be merged to reloadComplete later.

  • Participants
  • Parent commits 3fbbe4f
  • Branches stable

Comments (0)

Files changed (1)

File tortoisehg/hgqt/

         self.progress.emit(*cmdui.startProgress(_('Refresh'), _('status')))
         self.refthread = StatusThread(self.repo, self.pctx, self.pats, self.opts)
-        self.refthread.showMessage.connect(self.showMessage)
+        self.refthread.showMessage.connect(self.reloadFailed)
         if match:
+    # better to handle error in reloadComplete in place of separate signal?
+    @pyqtSlot(QString)
+    def reloadFailed(self, msg):
+        qtlib.ErrorMsgBox(_('Failed to refresh'), msg, parent=self)
     def isRefreshingWctx(self):
         return bool(self.refthread)