Differences between revisions 4 and 6 (spanning 2 versions)
Revision 4 as of 2015-12-01 01:16:31
Size: 1075
Editor: AugieFackler
Comment:
Revision 6 as of 2015-12-09 18:26:08
Size: 1219
Editor: mpm
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
<<Include(A:style)>>
<<Include(A:dev)>>
Line 5: Line 8:
  a. Probably `less`, and probably set `LESS=FSRX` if LESS isn't already set?
  a. Probably `less`, and probably set `LESS=FSRX` if LESS isn't already set?
Line 9: Line 11:
Line 16: Line 17:
or we could have a function to page the output, since I [augie] think that starting the pager isn't reversible:
Line 17: Line 19:
or we could have a function to page the output, since I [augie] think that starting the pager isn't reversible:
Line 22: Line 23:
That'd solve the problem of [alias] entries not getting paged.
Line 23: Line 25:
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.

{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

PagerInCorePlan (last edited 2017-12-06 21:37:58 by AugieFackler)