Type conflicts in extensions with TortoiseHG
Since Version 6.2 of TortoiseHG (Windows 64Bit) my extension is broken due type conflicts. Reproducable with simple extension from https://wiki.mercurial-scm.org/WritingExtensions:
mmm.py:
import mercurial
def reposetup(ui, repo):
class echologui(ui.__class__):
def log(self, service, *msg, **opts):
if msg:
self.write('%s: %s\n' % (service, msg[0] % msg[1:]))
super( echologui, self).log(service, *msg, **opts)
ui.__class__ = echologui
results in:
c:\hg_to_git\megatool>C:\Proggs\TortoiseHg\hg.exe ci -m"test"
** Unknown exception encountered with possibly-broken third-party extension "committext" (version N/A)
** which supports versions unknown of Mercurial.
** Please disable "committext" and try your action again.
** If that fixes the bug please report it to Der Autor der Erweiterung
** Python 3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)]
** Mercurial Distributed SCM (Version 6.4.2)
** Erweiterungen geladen: committext, hggit 1.0.2 (dulwich 0.21.3)
Traceback (most recent call last):
File "hg", line 58, in <module>
File "mercurial\dispatch.pyc", line 143, in run
File "mercurial\dispatch.pyc", line 232, in dispatch
File "mercurial\dispatch.pyc", line 276, in _rundispatch
File "mercurial\dispatch.pyc", line 451, in _runcatch
File "mercurial\dispatch.pyc", line 461, in _callcatch
File "mercurial\scmutil.pyc", line 153, in callcatch
File "mercurial\dispatch.pyc", line 441, in _runcatchfunc
File "mercurial\dispatch.pyc", line 1217, in _dispatch
File "mercurial\hg.pyc", line 241, in repository
File "mercurial\hg.pyc", line 210, in _setup_repo_or_peer
File "C:/Proggs/TortoiseHg/mmm.py", line 12, in log
self.write('%s: %s\n' % (service, msg[0] % msg[1:]))
File "mercurial\ui.pyc", line 1239, in write
TypeError: sequence item 0: expected a bytes-like object, str found
With this or similar types error extensions won't work. Last TortoiseHG version which works was 6.1.3.