pager: move most help to a new help topic and deprecate extension
authorAugie Fackler <augie@google.com>
Tue, 07 Feb 2017 00:07:53 -0500
changeset 31061 900996da577a
parent 31060 ab20491b1760
child 31062 88203f26ea57
pager: move most help to a new help topic and deprecate extension
hgext/pager.py
mercurial/help.py
mercurial/help/pager.txt
tests/test-globalopts.t
tests/test-help.t
tests/test-hgweb-json.t
tests/test-install.t
--- a/hgext/pager.py	Tue Feb 21 14:20:05 2017 -0500
+++ b/hgext/pager.py	Tue Feb 07 00:07:53 2017 -0500
@@ -12,51 +12,14 @@
 #
 # Run 'hg help pager' to get info on configuration.
 
-'''browse command output with an external pager
-
-To set the pager that should be used, set the application variable::
-
-  [pager]
-  pager = less -FRX
-
-If no pager is set, the pager extensions uses the environment variable
-$PAGER. If neither pager.pager, nor $PAGER is set, no pager is used.
-
-You can disable the pager for certain commands by adding them to the
-pager.ignore list::
+'''browse command output with an external pager (DEPRECATED)
 
-  [pager]
-  ignore = version, help, update
-
-You can also enable the pager only for certain commands using
-pager.attend. Below is the default list of commands to be paged::
-
-  [pager]
-  attend = annotate, cat, diff, export, glog, log, qdiff
-
-Setting pager.attend to an empty value will cause all commands to be
-paged.
-
-If pager.attend is present, pager.ignore will be ignored.
-
-Lastly, you can enable and disable paging for individual commands with
-the attend-<command> option. This setting takes precedence over
-existing attend and ignore options and defaults::
+Forcibly enable paging for individual commands that don't typically
+request pagination with the attend-<command> option. This setting
+takes precedence over ignore options and defaults::
 
   [pager]
   attend-cat = false
-
-To ignore global commands like :hg:`version` or :hg:`help`, you have
-to specify them in your user configuration file.
-
-To control whether the pager is used at all for an individual command,
-you can use --pager=<value>::
-
-  - use as needed: `auto`.
-  - require the pager: `yes` or `on`.
-  - suppress the pager: `no` or `off` (any unrecognized value
-  will also work).
-
 '''
 from __future__ import absolute_import
 
--- a/mercurial/help.py	Tue Feb 21 14:20:05 2017 -0500
+++ b/mercurial/help.py	Tue Feb 07 00:07:53 2017 -0500
@@ -230,6 +230,7 @@
      loaddoc('scripting')),
     (['internals'], _("Technical implementation topics"),
      internalshelp),
+    (['pager'], _("Pager Support"), loaddoc('pager')),
 ])
 
 # Maps topics with sub-topics to a list of their sub-topics.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/help/pager.txt	Tue Feb 07 00:07:53 2017 -0500
@@ -0,0 +1,28 @@
+Some Mercurial commands produce a lot of output, and Mercurial will
+attempt to use a pager to make those commands more pleasant.
+
+To set the pager that should be used, set the application variable::
+
+  [pager]
+  pager = less -FRX
+
+If no pager is set, the pager extensions uses the environment variable
+$PAGER. If neither pager.pager, nor $PAGER is set, a default pager
+will be used, typically `more`.
+
+You can disable the pager for certain commands by adding them to the
+pager.ignore list::
+
+  [pager]
+  ignore = version, help, update
+
+To ignore global commands like :hg:`version` or :hg:`help`, you have
+to specify them in your user configuration file.
+
+To control whether the pager is used at all for an individual command,
+you can use --pager=<value>::
+
+  - use as needed: `auto`.
+  - require the pager: `yes` or `on`.
+  - suppress the pager: `no` or `off` (any unrecognized value
+  will also work).
--- a/tests/test-globalopts.t	Tue Feb 21 14:20:05 2017 -0500
+++ b/tests/test-globalopts.t	Tue Feb 07 00:07:53 2017 -0500
@@ -351,6 +351,7 @@
    hgweb         Configuring hgweb
    internals     Technical implementation topics
    merge-tools   Merge Tools
+   pager         Pager Support
    patterns      File Name Patterns
    phases        Working with Phases
    revisions     Specifying Revisions
@@ -432,6 +433,7 @@
    hgweb         Configuring hgweb
    internals     Technical implementation topics
    merge-tools   Merge Tools
+   pager         Pager Support
    patterns      File Name Patterns
    phases        Working with Phases
    revisions     Specifying Revisions
--- a/tests/test-help.t	Tue Feb 21 14:20:05 2017 -0500
+++ b/tests/test-help.t	Tue Feb 07 00:07:53 2017 -0500
@@ -113,6 +113,7 @@
    hgweb         Configuring hgweb
    internals     Technical implementation topics
    merge-tools   Merge Tools
+   pager         Pager Support
    patterns      File Name Patterns
    phases        Working with Phases
    revisions     Specifying Revisions
@@ -188,6 +189,7 @@
    hgweb         Configuring hgweb
    internals     Technical implementation topics
    merge-tools   Merge Tools
+   pager         Pager Support
    patterns      File Name Patterns
    phases        Working with Phases
    revisions     Specifying Revisions
@@ -262,7 +264,6 @@
        largefiles    track large binary files
        mq            manage a stack of patches
        notify        hooks for sending email push notifications
-       pager         browse command output with an external pager
        patchbomb     command to send changesets as (a series of) patch emails
        purge         command to delete untracked files from the working
                      directory
@@ -831,6 +832,7 @@
    hgweb         Configuring hgweb
    internals     Technical implementation topics
    merge-tools   Merge Tools
+   pager         Pager Support
    patterns      File Name Patterns
    phases        Working with Phases
    revisions     Specifying Revisions
@@ -1918,6 +1920,13 @@
   Merge Tools
   </td></tr>
   <tr><td>
+  <a href="/help/pager">
+  pager
+  </a>
+  </td><td>
+  Pager Support
+  </td></tr>
+  <tr><td>
   <a href="/help/patterns">
   patterns
   </a>
--- a/tests/test-hgweb-json.t	Tue Feb 21 14:20:05 2017 -0500
+++ b/tests/test-hgweb-json.t	Tue Feb 07 00:07:53 2017 -0500
@@ -1593,6 +1593,10 @@
         "topic": "merge-tools"
       },
       {
+        "summary": "Pager Support",
+        "topic": "pager"
+      },
+      {
         "summary": "File Name Patterns",
         "topic": "patterns"
       },
--- a/tests/test-install.t	Tue Feb 21 14:20:05 2017 -0500
+++ b/tests/test-install.t	Tue Feb 07 00:07:53 2017 -0500
@@ -166,6 +166,7 @@
     help/hg.1.txt
     help/hgignore.5.txt
     help/hgrc.5.txt
+    help/pager.txt
   Not tracked:
 
   $ python wixxml.py templates