https://bz.mercurial-scm.org/show_bug.cgi?id=5558
Bug ID: 5558 Summary: Introduction of debugcommands broke TortoiseHg with largefiles. Product: Mercurial Version: stable branch Hardware: PC OS: Linux Status: UNCONFIRMED Severity: bug Priority: wish Component: Mercurial Assignee: bugzi...@mercurial-scm.org Reporter: m...@kiilerich.com CC: mercurial-devel@mercurial-scm.org Launching TortoiseHg 4.2 with largefiles enabled currently crashes with #!python ** Mercurial version (4.2+9-247bb7a2c492). TortoiseHg version (4.2+3-a31a74366902) ** Command: ** CWD: /home/mk/thg ** Encoding: UTF-8 ** Extensions loaded: convert, eol, extdiff, graphlog, largefiles, patchbomb, purge, rebase, shelve, transplant, strip, mq, mbox, dynapath ** Python version: 2.7.13 (default, Jan 12 2017, 17:59:37) [GCC 6.3.1 20161221 (Red Hat 6.3.1-1)] ** System: Linux xps 4.10.13-200.fc25.x86_64 #1 SMP Thu Apr 27 20:39:25 UTC 2017 x86_64 ** Qt-4.8.7 PyQt-4.11.4 QScintilla-2.9.3 Traceback (most recent call last): File "/home/mk/thg/tortoisehg/hgqt/run.py", line 47, in dispatch return _runcatch(u, args) File "/home/mk/thg/tortoisehg/hgqt/run.py", line 241, in _runcatch return runcommand(ui, args) File "/home/mk/thg/tortoisehg/hgqt/run.py", line 309, in runcommand hglib.loadextensions(lui) File "/home/mk/thg/tortoisehg/util/hglib.py", line 315, in loadextensions extensions.loadall(ui) File "/home/mk/hg/mercurial/extensions.py", line 187, in loadall _runuisetup(name, ui) File "/home/mk/hg/mercurial/extensions.py", line 152, in _runuisetup uisetup(ui) File "/home/mk/hg/hgext/largefiles/__init__.py", line 137, in uisetup uisetupmod.uisetup(ui) File "/home/mk/hg/hgext/largefiles/uisetup.py", line 86, in uisetup overrides.overridedebugstate) File "/home/mk/hg/mercurial/extensions.py", line 272, in wrapcommand aliases, entry = cmdutil.findcmd(command, table) File "/home/mk/hg/mercurial/cmdutil.py", line 350, in findcmd raise error.UnknownCommand(cmd, allcmds) UnknownCommand: ('debugstate', ['locate', 'help', 'summary', 'sum', 'annotate', 'blame', 'tip', 'recover', 'serve', 'tag', 'config', 'showconfig', 'debugconfig', 'unbundle', 'manifest', 'identify', 'id', 'archive', 'graft', 'paths', 'push', 'heads', 'verify', 'remove', 'rm', 'addremove', 'debugmbox', 'backout', 'version', 'parents', 'branch', 'copy', 'cp', 'status', 'st', 'files', 'import', 'patch', 'resolve', 'rollback', 'tags', 'rename', 'move', 'mv', 'bundle', 'bookmarks', 'bookmark', 'update', 'up', 'checkout', 'co', 'pull', 'init', 'phase', 'grep', 'forget', 'add', 'log', 'history', 'clone', 'branches', 'commit', 'ci', 'incoming', 'in', 'bisect', 'revert', 'cat', 'merge', 'outgoing', 'out', 'mimport', 'root', 'diff', 'export']) Granted, TortoiseHg messes with Mercurial internals and it shouldn't. But ... The root cause is that 869d660b8669 moved debug commands to a separate module. Importing mercurial.commands is thus no longer enough to get a fully populated mercurial.commands.commands . It thus had to import debugcommands from dispatch.py , but because demandimport it also had to access debugcommands.command in _dispatch . Still, it leaves Mercurial exposing an incomplete mercurial.commands table. The wrapping code in largefiles initialization thus depends on being run from _dispatch. That is fragile and seems like a bug to me. I don't know about the intended goal of having a separate commands table for debug commands. Instead I would suggest moving the import (with demandimport workaround) to mercurial.commands . But that is just my initial analysis of the situation. If not, what is the recommended workaround for TortoiseHg? -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel