# HG changeset patch # User Augie Fackler # Date 2017-02-07 04:21:45 # Node ID 5e85bab867a722b0c6e11c48c92d5bcab9bef46d # Parent 3ed6e43998df6600c7b17ac21899377e2931811e ui: add ignore-single-command functionality This closes the last feature gap other than the attend list from the extension. For now, I'm leaving the attend list in the extension, because I'm unsure it has merit in a world where commands have been updated to take advantage of the modern API. diff --git a/hgext/pager.py b/hgext/pager.py --- a/hgext/pager.py +++ b/hgext/pager.py @@ -94,6 +94,12 @@ def uisetup(ui): break if usepager: + # Slight hack: the attend list is supposed to override + # the ignore list for the pager extension, but the + # core code doesn't know about attend, so we have to + # lobotomize the ignore list so that the extension's + # behavior is preserved. + ui.setconfig('pager', 'ignore', '', 'pager') ui.pager('extension-via-attend-' + cmd) return orig(ui, options, cmd, cmdfunc) diff --git a/mercurial/ui.py b/mercurial/ui.py --- a/mercurial/ui.py +++ b/mercurial/ui.py @@ -851,6 +851,7 @@ class ui(object): """ if (self._neverpager or self.pageractive + or command in self.configlist('pager', 'ignore') # TODO: if we want to allow HGPLAINEXCEPT=pager, # formatted() will need some adjustment. or not self.formatted()