[PATCH 2 of 4 V2] pager: set an attribute on ui indicating that a pager is active
Gregory Szorc
gregory.szorc at gmail.com
Fri Feb 6 14:11:02 CST 2015
# HG changeset patch
# User Gregory Szorc <gregory.szorc at gmail.com>
# Date 1423253276 28800
# Fri Feb 06 12:07:56 2015 -0800
# Node ID b46b4078fbecbfacaecc3ca4bf71c90b74908467
# Parent c6e2f3414f33e46ecbc1788e38be9c79a1ce6e50
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 --git a/hgext/pager.py b/hgext/pager.py
--- a/hgext/pager.py
+++ b/hgext/pager.py
@@ -148,8 +148,10 @@ def uisetup(ui):
(cmd not in ignore and not attend)):
usepager = True
break
+ setattr(ui, 'pageractive', usepager)
+
if usepager:
ui.setconfig('ui', 'formatted', ui.formatted(), 'pager')
ui.setconfig('ui', 'interactive', False, 'pager')
if util.safehasattr(signal, "SIGPIPE"):
More information about the Mercurial-devel
mailing list