{i} This page does not meet our wiki style guidelines. Please help improve this page by cleaning up its formatting.

Note:

This page is primarily intended for developers of Mercurial.

We think we'd like some sort of automatic pager support in core and on by default. This page exists to (roughly) document problems with the existing pager support, so we can outline a path to a real solution:

  1. Pager only applies to a handful of whitelisted commands, and aliases using those commands don't get paged
  2. What should the default pager configuration be?

    1. Probably less, and probably set LESS=FSRX if LESS isn't already set?

Handling aliases

It looks like git just hard-codes which commands use the pager. We could probably do something similar by having a paged context manager on ui, eg:

  with ui.paged:
    # all ui prints here go to the pager

or we could have a function to page the output, since I [augie] think that starting the pager isn't reversible:

  ui.pager()
  # all subsequent output goes to the pager

That'd solve the problem of [alias] entries not getting paged.

Handling errors

If you use --traceback, currently the error is paged. This doesn't seem ideal.


CategoryDeveloper CategoryNewFeatures