changeset 31033:861b070d92da

qdiff: migrate to modern pager API This results in the default pager-attend list being empty. Sadly, we can't let the code be that way, because some legacy extensions depend on hooking the pager's attend list at import time (and we'd like to not break them), and if the list is actually *empty* that triggers magic behavior in the extension that attends everything. Instead, we put a long, improbable command name as the only entry in the attend list.
author Augie Fackler <augie@google.com>
date Mon, 06 Feb 2017 23:57:21 -0500
parents 1cec1d863008
children 270ab9d2ffbb
files hgext/mq.py hgext/pager.py
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/mq.py	Mon Feb 06 22:59:25 2017 -0500
+++ b/hgext/mq.py	Mon Feb 06 23:57:21 2017 -0500
@@ -2676,6 +2676,7 @@
 
     Returns 0 on success.
     """
+    ui.pager('qdiff')
     repo.mq.diff(repo, pats, opts)
     return 0
 
--- a/hgext/pager.py	Mon Feb 06 22:59:25 2017 -0500
+++ b/hgext/pager.py	Mon Feb 06 23:57:21 2017 -0500
@@ -110,4 +110,6 @@
         extensions.wrapfunction(dispatch, '_runcommand', pagecmd)
     extensions.afterloaded('color', afterloaded)
 
-attended = ['qdiff']
+attended = [
+    'the-default-attend-list-is-now-empty-but-that-breaks-the-extension',
+]