https://bz.mercurial-scm.org/show_bug.cgi?id=6859
Bug ID: 6859 Summary: histedit broken with ncurses patchlevel 20231111 Product: Mercurial Version: unspecified Hardware: PC OS: Linux Status: UNCONFIRMED Severity: bug Priority: wish Component: histedit Assignee: bugzi...@mercurial-scm.org Reporter: jcris...@debian.org CC: mercurial-de...@mercurial-scm.org Python Version: --- >From https://bugs.debian.org/1058041: Since a ncurses upgrade in testing recently `hg histedit` seems to crash consistently, upon trying to apply the changes: > Traceback (most recent call last): > File "/usr/bin/hg", line 59, in <module> > dispatch.run() > File "/usr/lib/python3/dist-packages/mercurial/dispatch.py", line 142, in > run > status = dispatch(req) > ^^^^^^^^^^^^^ > File "/usr/lib/python3/dist-packages/mercurial/dispatch.py", line 231, in > dispatch > status = _rundispatch(req) > ^^^^^^^^^^^^^^^^^ > File "/usr/lib/python3/dist-packages/mercurial/dispatch.py", line 275, in > _rundispatch > ret = _runcatch(req) or 0 > ^^^^^^^^^^^^^^ > File "/usr/lib/python3/dist-packages/mercurial/dispatch.py", line 456, in > _runcatch > return _callcatch(ui, _runcatchfunc) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/lib/python3/dist-packages/mercurial/dispatch.py", line 466, in > _callcatch > return scmutil.callcatch(ui, func) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/lib/python3/dist-packages/mercurial/scmutil.py", line 152, in > callcatch > return func() > ^^^^^^ > File "/usr/lib/python3/dist-packages/mercurial/dispatch.py", line 446, in > _runcatchfunc > return _dispatch(req) > ^^^^^^^^^^^^^^ > File "/usr/lib/python3/dist-packages/mercurial/dispatch.py", line 1271, in > _dispatch > return runcommand( > ^^^^^^^^^^^ > File "/usr/lib/python3/dist-packages/mercurial/dispatch.py", line 904, in > runcommand > ret = _runcommand(ui, options, cmd, d) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/lib/python3/dist-packages/mercurial/dispatch.py", line 1283, in > _runcommand > return cmdfunc() > ^^^^^^^^^ > File "/usr/lib/python3/dist-packages/mercurial/dispatch.py", line 1269, in > <lambda> > d = lambda: util.checksignature(func)(ui, *args, **strcmdopt) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/lib/python3/dist-packages/mercurial/util.py", line 1878, in check > return func(*args, **kwargs) > ^^^^^^^^^^^^^^^^^^^^^ > File "/usr/lib/python3/dist-packages/hgext/histedit.py", line 1918, in > histedit > return _chistedit(ui, repo, freeargs, opts) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/lib/python3/dist-packages/hgext/histedit.py", line 1764, in > _chistedit > curses.endwin() > _curses.error: endwin() returned ERR Debian's ncurses package maintainer says: > > I am not familiar with Mercurial, but most likely this has been > > triggered by the following change in the 2023111 patchlevel: > > > > ,---- > > | 20231111 > > | + modify endwin() to return an error if it is called again without an > > | intervening screen update (report by Rajeev Pillai, NetBSD #57592). > > `---- > I now had a look at the histedit code, and it does this: > ,---- > | with util.with_lc_ctype(): > | rc = curses.wrapper(functools.partial(_chisteditmain, repo, > rules)) > | curses.echo() > | curses.endwin() > `---- > AFAICS, invoking curses.echo() and curses.endwin() is superfluous > because curses.wrapper already does that for you, and calling > curses.endwin() twice throws an error with the newer ncurses. Removing -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ Mercurial-devel mailing list Mercurial-devel@lists.mercurial-scm.org https://lists.mercurial-scm.org/mailman/listinfo/mercurial-devel