# HG changeset patch # User Augie Fackler <au...@google.com> # Date 1486441305 18000 # Mon Feb 06 23:21:45 2017 -0500 # Node ID 1a671cd4d4aff343040e7764fcc4402725fb5a0d # Parent 8695f290ba7c1a7f6c1b93ba344fbbe1193ab1a5 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 @@ -817,6 +817,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() _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel