Issue #2170 resolved

Error message

Roland Geider
created an issue

Sometimes tortoiseHG pops up this error message (while it is not being 'actively' used, i.e. sitting on the background). However, everything seems to work fine after it.

{{{

!python

Mercurial version (2.3.1+21-6e2ab601be3f). TortoiseHg version (2.5+13-c4b87ec7a201) Command: CWD: /home/myusername Encoding: ISO-8859-15 Extensions loaded: gpg, hgk, extdiff, graphlog, children, record, fetch, relink, patchbomb, convert, rebase, altsshscheme, keyword, mq Python version: 2.6.6 (r266:84292, Dec 27 2010, 00:02:40) [GCC 4.4.5] ** Qt-4.6.3 PyQt-4.7.3 Traceback (most recent call last): File "/path/to/thg/tortoisehg/hgqt/workbench.py", line 770, in _updateRepoTabTitle index = self.repoTabsWidget.indexOf(self.sender()) TypeError: QTabWidget.indexOf(QWidget): argument 1 has unexpected type 'ThgRepoWrapper'

}}}

Comments (7)

  1. Yuya Nishihara

    Does it happen when .hg/hgrc is modified, i.e. touch .hg/hgrc ? If so, can you test the following change:

    diff --git a/tortoisehg/hgqt/workbench.py b/tortoisehg/hgqt/workbench.py
    --- a/tortoisehg/hgqt/workbench.py
    +++ b/tortoisehg/hgqt/workbench.py
    @@ -765,7 +765,7 @@ class Workbench(QMainWindow):
             self.log.setRepository(repo)
             self.mqpatches.setrepo(repo)
     
    -    @pyqtSlot(unicode)
    +    # avoid bug of old PyQt: @pyqtSlot(unicode)
         def _updateRepoTabTitle(self, title):
             index = self.repoTabsWidget.indexOf(self.sender())
             self.repoTabsWidget.setTabText(index, title)
    

    I found PyQt<=4.7.3 has similar bug, but which returns None instead: http://www.riverbankcomputing.com/pipermail/pyqt/2010-August/027557.html

  2. Log in to comment