Closed Bug 1422227 Opened 7 years ago Closed 3 years ago

Include a _curses with MozillaBuild so that Mercurial curses interface is usable

Categories

(Firefox Build System :: MozillaBuild, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1744838

People

(Reporter: xidorn, Unassigned)

Details

Python doesn't ship the _curses binary module with its Windows version, and thus Mercurial cannot use its curses interface on Windows, which is quite unfortunate. However, it seems that it is possible to build a _curses module for Python on Windows. This page provides built curses wheel for Windows Python: https://www.lfd.uci.edu/~gohlke/pythonlibs/#curses I downloaded the wheel for Python 2.7 on win64, and extract the two pyd files into mozilla-build/python/DLLs, and the curses interface of Mercurial works. Maybe we can build this and pack it into MozillaBuild so that developers on Windows can use curses interface as well.
This definitely sounds worth investigating. Thanks for finding this! If all we need to do is drop a self-contained DLL (a .pyd is a shared library) into the Python extensions directory and it "just works," then we should do this.
Note that, there seems to be some bugs with this curses and hg: * the console would no longer get any mouse event, i.e. the console content is not selectable, and it's not scrollable with mouse wheel * the command line buffer seems to get lost when outside the screen I suppose this may be something fixable, since neither vim nor try fuzzy has these problems.

Now Mercurial 4.9 uses curses UI by default, so I had to install windows-curses.

(In reply to Xidorn Quan [:xidorn] UTC+11 from comment #2)

  • the console would no longer get any mouse event, i.e. the console content
    is not selectable, and it's not scrollable with mouse wheel

I think it is wmcbrine/PDCurses#53.

This is being moved over to this ticket to specifically address the use case that this bug is solving: make the hg TUI work.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
Product: mozilla.org → Firefox Build System
You need to log in before you can comment on or make changes to this bug.