Commits

Yuya Nishihara committed 2ffaf6a

bookmark, sign: show command error in status line

  • Participants
  • Parent commits f21ca25

Comments (0)

Files changed (2)

tortoisehg/hgqt/bookmark.py

                             ~Qt.WindowContextHelpButtonHint)
         self._repoagent = repoagent
         repo = repoagent.rawRepo()
+        self._cmdsession = None
         self.rev = rev
         self.node = repo[rev].node()
 
     def _runBookmark(self, *args, **opts):
         self._finishmsg = opts.pop('finishmsg')
         cmdline = hglib.buildcmdargs('bookmarks', *args, **opts)
-        sess = self._repoagent.runCommand(cmdline, self)
+        self._cmdsession = sess = self._repoagent.runCommand(cmdline, self)
         sess.commandFinished.connect(self._onBookmarkFinished)
 
     @pyqtSlot(int)
             self.newNameEdit.setText('')
             self.set_status(self._finishmsg, True)
         else:
+            self.set_status(self._cmdsession.errorString(), False)
             self.makeLogVisible.emit(True)
 
     @pyqtSlot()

tortoisehg/hgqt/sign.py

 
         self._repoagent = repoagent
         repo = repoagent.rawRepo()
+        self._cmdsession = None
         self.rev = rev
 
         # base layout box
         if ret == 0:
             self.set_status(_("Signature has been added"))
         else:
+            self.set_status(self._cmdsession.errorString(), False)
             self.makeLogVisible.emit(True)
 
     @pyqtSlot()
 
         cmd.append(str(self.rev))
         sess = self._repoagent.runCommand(map(hglib.tounicode, cmd), self)
+        self._cmdsession = sess
         sess.commandFinished.connect(self.commandFinished)
 
     def customMessageToggle(self, checked):