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.
--- 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',
+]