# HG changeset patch # User Gregory Szorc # Date 1423253276 28800 # Node ID afdf5f6ab37ae47611f6b24433de22b6e3b42980 # Parent d8837ad682dd34be20a1008e76e5e62e2584e3b0 pager: set an attribute on ui indicating that a pager is active A subsequent patch will teach the color extension to do different things depending on whether a pager is active. This patch leaves a breadcrumb on the ui instance to allow it do that that. diff -r d8837ad682dd -r afdf5f6ab37a hgext/pager.py --- a/hgext/pager.py Fri Feb 06 12:07:32 2015 -0800 +++ b/hgext/pager.py Fri Feb 06 12:07:56 2015 -0800 @@ -149,6 +149,8 @@ usepager = True break + setattr(ui, 'pageractive', usepager) + if usepager: ui.setconfig('ui', 'formatted', ui.formatted(), 'pager') ui.setconfig('ui', 'interactive', False, 'pager')