Mercurial no longer has fancyopts.getopt
Created originally on Bitbucket by kiilerix (Mads Kiilerich)
Mercurial c6ce11f2ee50 dropped the internal accidentally exposed fancyopts.getopt .
In case of exceptions, that cause the released thg 4.2 to crash when in invalid option is specified on the command line:
#!python
** Mercurial version (4.2+9-247bb7a2c492). TortoiseHg version (4.2+1-9d3acfb55d3d)
** Command: version --traceback
** CWD: /home/mk/thg
** Encoding: UTF-8
** Extensions loaded:
** 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 267, in runcommand
cmd, func, args, options, cmdoptions, alias = _parse(ui, args)
File "/home/mk/thg/tortoisehg/hgqt/run.py", line 216, in _parse
except fancyopts.getopt.GetoptError, inst:
AttributeError: 'module' object has no attribute 'getopt'
I guess tortoisehg/hgqt/run.py
just should import and use getopt directly.