Yuya Nishihara avatar 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
(2.8.2+67-c822f88ae07e)
** 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'

Comments (0)

Files changed (1)

tortoisehg/hgqt/workbench.py

         '''opens the given repo in a new tab'''
         rw = RepoWidget(repoagent, self, bundle=bundle)
         rw.showMessageSignal.connect(self.showMessage)
-        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))
         rw.output.connect(self._appendRepoWidgetOutput)
         rw.makeLogVisible.connect(self.log.setShown)
         rw.revisionSelected.connect(self.updateHistoryActions)
         self.updateMenu()
         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()
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.