1. TortoiseHg
  2. TortoiseHg
  3. thg


Yuya Nishihara  committed eade6cd

workbench: connect RepoWidget's progress by lambda again (backout 99dd1670838f)

99dd1670838f appears to cause strange exception. But it's hard to track down
due to lack of reproducible method.

** Mercurial version (2.6.3+34-ea4342d0e6fe). TortoiseHg version
** Command:
** CWD: C:\Program Files\TortoiseHg
** Encoding: cp1252
** Extensions loaded: mercurial_keyring, mq, hgsubversion, hg-git, rebase
** Python version: 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500
64 bit (AMD64)]
** Windows version: sys.getwindowsversion(major=6, minor=1, build=7601,
platform=2, service_pack='Service Pack 1')
** Processor architecture: x64
** Qt-4.8.4 PyQt-4.9.6 QScintilla-2.7
Traceback (most recent call last):
File "tortoisehg\hgqt\workbench.pyo", line 914, in _showRepoWidgetProgress
AttributeError: 'QTabWidget' object has no attribute 'repo'

  • Participants
  • Parent commits a713738
  • Branches stable

Comments (0)

Files changed (1)

File tortoisehg/hgqt/workbench.py

View file
  • Ignore whitespace
         '''opens the given repo in a new tab'''
         rw = RepoWidget(repoagent, self, bundle=bundle)
-        rw.progress.connect(self._showRepoWidgetProgress)
+        rw.progress.connect(lambda tp, p, i, u, tl:
+            self.statusbar.progress(tp, p, i, u, tl, rw.repo.root))
         return rw
-    #@pyqtSlot(QString, object, QString, QString, object)
-    def _showRepoWidgetProgress(self, topic, pos, item, unit, total):
-        rw = self.sender()
-        assert isinstance(rw, RepoWidget)
-        self.statusbar.progress(topic, pos, item, unit, total, rw.repo.root)
     #@pyqtSlot(QString, QString)
     def _appendRepoWidgetOutput(self, msg, label):
         rw = self.sender()