comparison hgext/pager.py @ 31406:e83302d43748

pager: if old pager extensions is enabled, respect pager.attend This patch makes us respect pager.attend again if the extension is enabled. It also brings back the default attend list, so e.g. summary is not paged by default, just like it used to be before pager was moved into core.
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 13 Mar 2017 21:43:17 -0700
parents 53a60e95f154
children 6d1b0970f80c
comparison
equal deleted inserted replaced
31405:d5eb20934c36 31406:e83302d43748
62 # core code doesn't know about attend, so we have to 62 # core code doesn't know about attend, so we have to
63 # lobotomize the ignore list so that the extension's 63 # lobotomize the ignore list so that the extension's
64 # behavior is preserved. 64 # behavior is preserved.
65 ui.setconfig('pager', 'ignore', '', 'pager') 65 ui.setconfig('pager', 'ignore', '', 'pager')
66 ui.pager('extension-via-attend-' + cmd) 66 ui.pager('extension-via-attend-' + cmd)
67 else:
68 ui.disablepager()
67 return orig(ui, options, cmd, cmdfunc) 69 return orig(ui, options, cmd, cmdfunc)
68 70
69 extensions.wrapfunction(dispatch, '_runcommand', pagecmd) 71 extensions.wrapfunction(dispatch, '_runcommand', pagecmd)
70 72
71 attended = [ 73 attended = ['annotate', 'cat', 'diff', 'export', 'glog', 'log', 'qdiff']
72 'the-default-attend-list-is-now-empty-but-that-breaks-the-extension',
73 ]