Issue #2170 resolved

Error message

Roland Geider avatarRoland 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.

** 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
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.