Bug 6196 - histedit curses mode broken on py3 in 5.1.1
Summary: histedit curses mode broken on py3 in 5.1.1
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: histedit (show other bugs)
Version: 5.1
Hardware: PC Mac OS
: wish feature
Assignee: Bugzilla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-10 09:32 UTC by Marcin Kuzminski
Modified: 2019-10-24 00:01 UTC (History)
2 users (show)

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcin Kuzminski 2019-09-10 09:32 UTC
** unknown exception encountered, please report by visiting
** https://mercurial-scm.org/wiki/BugTracker
** Python 3.7.4 (default, Sep  7 2019, 18:29:04) [Clang 10.0.0 (clang-1000.11.45.5)]
** Mercurial Distributed SCM (version 5.1.1)
** Extensions loaded: extdiff, pager, strip, mq, purge, transplant, churn, largefiles, rebase, histedit, convert, graphlog, record, gpg, evolve, topic, absorb
Traceback (most recent call last):
  File "/usr/local/bin/hg", line 43, in <module>
    dispatch.run()
  File "/usr/local/Cellar/mercurial/5.1.1_1/lib/python3.7/site-packages/mercurial/dispatch.py", line 99, in run
    status = dispatch(req)
  File "/usr/local/Cellar/mercurial/5.1.1_1/lib/python3.7/site-packages/mercurial/dispatch.py", line 225, in dispatch
    ret = _runcatch(req) or 0
  File "/usr/local/Cellar/mercurial/5.1.1_1/lib/python3.7/site-packages/mercurial/dispatch.py", line 376, in _runcatch
    return _callcatch(ui, _runcatchfunc)
  File "/usr/local/Cellar/mercurial/5.1.1_1/lib/python3.7/site-packages/mercurial/dispatch.py", line 384, in _callcatch
    return scmutil.callcatch(ui, func)
  File "/usr/local/Cellar/mercurial/5.1.1_1/lib/python3.7/site-packages/mercurial/scmutil.py", line 167, in callcatch
    return func()
  File "/usr/local/Cellar/mercurial/5.1.1_1/lib/python3.7/site-packages/mercurial/dispatch.py", line 367, in _runcatchfunc
    return _dispatch(req)
  File "/usr/local/Cellar/mercurial/5.1.1_1/lib/python3.7/site-packages/mercurial/dispatch.py", line 1021, in _dispatch
    cmdpats, cmdoptions)
  File "/usr/local/Cellar/mercurial/5.1.1_1/lib/python3.7/site-packages/mercurial/dispatch.py", line 756, in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/local/Cellar/mercurial/5.1.1_1/lib/python3.7/site-packages/hgext/pager.py", line 77, in pagecmd
    return orig(ui, options, cmd, cmdfunc)
  File "/usr/local/Cellar/mercurial/5.1.1_1/lib/python3.7/site-packages/mercurial/dispatch.py", line 1030, in _runcommand
    return cmdfunc()
  File "/usr/local/Cellar/mercurial/5.1.1_1/lib/python3.7/site-packages/mercurial/dispatch.py", line 1018, in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
  File "/usr/local/Cellar/mercurial/5.1.1_1/lib/python3.7/site-packages/mercurial/util.py", line 1682, in check
    return func(*args, **kwargs)
  File "/usr/local/Cellar/mercurial/5.1.1_1/lib/python3.7/site-packages/mercurial/util.py", line 1682, in check
    return func(*args, **kwargs)
  File "/usr/local/Cellar/mercurial/5.1.1_1/lib/python3.7/site-packages/hgext/mq.py", line 3655, in mqcommand
    return orig(ui, repo, *args, **kwargs)
  File "/usr/local/Cellar/mercurial/5.1.1_1/lib/python3.7/site-packages/mercurial/util.py", line 1682, in check
    return func(*args, **kwargs)
  File "/usr/local/Cellar/mercurial/5.1.1_1/lib/python3.7/site-packages/hgext/histedit.py", line 1678, in histedit
    return _chistedit(ui, repo, *freeargs, **opts)
  File "/usr/local/Cellar/mercurial/5.1.1_1/lib/python3.7/site-packages/hgext/histedit.py", line 1540, in _chistedit
    rc = curses.wrapper(functools.partial(_chisteditmain, repo, ctxs))
  File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/curses/__init__.py", line 102, in wrapper
    return func(stdscr, *args, **kwds)
  File "/usr/local/Cellar/mercurial/5.1.1_1/lib/python3.7/site-packages/hgext/histedit.py", line 1437, in _chisteditmain
    e = event(state, ch)
  File "/usr/local/Cellar/mercurial/5.1.1_1/lib/python3.7/site-packages/hgext/histedit.py", line 1156, in event
    if '0' <= ch <= '9':
TypeError: '<=' not supported between instances of 'bytes' and 'NoneType'
Comment 1 Augie Fackler 2019-09-10 14:18 UTC
You've been burned by homebrew moving to py3. There's a real bug here (so I'll edit) but as a workaround switch yourself to py2.
Comment 2 HG Bot 2019-10-16 10:25 UTC
Fixed by https://mercurial-scm.org/repo/hg/rev/0d609ed185ea
Denis Laxalde <denis.laxalde@logilab.fr>
py3: prevent comparison with None in curses histedit (issue6196)

(please test the fix)
Comment 3 Bugzilla 2019-10-24 00:01 UTC
Bug was set to TESTING for 7 days, resolving