mercurial/help/pager.txt
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
Mon, 10 Apr 2017 16:46:53 +0200
changeset 31915 ba7e226291f2
parent 31062 88203f26ea57
child 32078 bf5e13e38390
permissions -rw-r--r--
obsolescence: add test case B-3 for obsolescence markers exchange About 3 years ago, in August 2014, the logic to select what markers to select on push was ported from the evolve extension to Mercurial core. However, for some unclear reasons, the tests for that logic were not ported alongside. I realised it a couple of weeks ago while working on another push related issue. I've made a clean up pass on the tests and they are now ready to integrate the core test suite. This series of changesets do not change any logic. I just adds test for logic that has been around for about 10 versions of Mercurial. They are a patch for each test case. It makes it easier to review and postpone one with documentation issues without rejecting the wholes series. This patch introduce case B3: Pruned changeset on non-pushed part of the history Each test case comes it in own test file. It help parallelism and does not introduce a significant overhead from having a single unified giant test file. Here are timing to support this claim. # Multiple test files version: # run-tests.py --local -j 1 test-exchange-*.t 53.40s user 6.82s system 85% cpu 1:10.76 total 52.79s user 6.97s system 85% cpu 1:09.97 total 52.94s user 6.82s system 85% cpu 1:09.69 total # Single test file version: # run-tests.py --local -j 1 test-exchange-obsmarkers.t 52.97s user 6.85s system 85% cpu 1:10.10 total 52.64s user 6.79s system 85% cpu 1:09.63 total 53.70s user 7.00s system 85% cpu 1:11.17 total
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
31061
900996da577a pager: move most help to a new help topic and deprecate extension
Augie Fackler <augie@google.com>
parents:
diff changeset
     1
Some Mercurial commands produce a lot of output, and Mercurial will
900996da577a pager: move most help to a new help topic and deprecate extension
Augie Fackler <augie@google.com>
parents:
diff changeset
     2
attempt to use a pager to make those commands more pleasant.
900996da577a pager: move most help to a new help topic and deprecate extension
Augie Fackler <augie@google.com>
parents:
diff changeset
     3
900996da577a pager: move most help to a new help topic and deprecate extension
Augie Fackler <augie@google.com>
parents:
diff changeset
     4
To set the pager that should be used, set the application variable::
900996da577a pager: move most help to a new help topic and deprecate extension
Augie Fackler <augie@google.com>
parents:
diff changeset
     5
900996da577a pager: move most help to a new help topic and deprecate extension
Augie Fackler <augie@google.com>
parents:
diff changeset
     6
  [pager]
900996da577a pager: move most help to a new help topic and deprecate extension
Augie Fackler <augie@google.com>
parents:
diff changeset
     7
  pager = less -FRX
900996da577a pager: move most help to a new help topic and deprecate extension
Augie Fackler <augie@google.com>
parents:
diff changeset
     8
900996da577a pager: move most help to a new help topic and deprecate extension
Augie Fackler <augie@google.com>
parents:
diff changeset
     9
If no pager is set, the pager extensions uses the environment variable
900996da577a pager: move most help to a new help topic and deprecate extension
Augie Fackler <augie@google.com>
parents:
diff changeset
    10
$PAGER. If neither pager.pager, nor $PAGER is set, a default pager
900996da577a pager: move most help to a new help topic and deprecate extension
Augie Fackler <augie@google.com>
parents:
diff changeset
    11
will be used, typically `more`.
900996da577a pager: move most help to a new help topic and deprecate extension
Augie Fackler <augie@google.com>
parents:
diff changeset
    12
900996da577a pager: move most help to a new help topic and deprecate extension
Augie Fackler <augie@google.com>
parents:
diff changeset
    13
You can disable the pager for certain commands by adding them to the
900996da577a pager: move most help to a new help topic and deprecate extension
Augie Fackler <augie@google.com>
parents:
diff changeset
    14
pager.ignore list::
900996da577a pager: move most help to a new help topic and deprecate extension
Augie Fackler <augie@google.com>
parents:
diff changeset
    15
900996da577a pager: move most help to a new help topic and deprecate extension
Augie Fackler <augie@google.com>
parents:
diff changeset
    16
  [pager]
900996da577a pager: move most help to a new help topic and deprecate extension
Augie Fackler <augie@google.com>
parents:
diff changeset
    17
  ignore = version, help, update
900996da577a pager: move most help to a new help topic and deprecate extension
Augie Fackler <augie@google.com>
parents:
diff changeset
    18
900996da577a pager: move most help to a new help topic and deprecate extension
Augie Fackler <augie@google.com>
parents:
diff changeset
    19
To ignore global commands like :hg:`version` or :hg:`help`, you have
900996da577a pager: move most help to a new help topic and deprecate extension
Augie Fackler <augie@google.com>
parents:
diff changeset
    20
to specify them in your user configuration file.
900996da577a pager: move most help to a new help topic and deprecate extension
Augie Fackler <augie@google.com>
parents:
diff changeset
    21
900996da577a pager: move most help to a new help topic and deprecate extension
Augie Fackler <augie@google.com>
parents:
diff changeset
    22
To control whether the pager is used at all for an individual command,
900996da577a pager: move most help to a new help topic and deprecate extension
Augie Fackler <augie@google.com>
parents:
diff changeset
    23
you can use --pager=<value>::
900996da577a pager: move most help to a new help topic and deprecate extension
Augie Fackler <augie@google.com>
parents:
diff changeset
    24
900996da577a pager: move most help to a new help topic and deprecate extension
Augie Fackler <augie@google.com>
parents:
diff changeset
    25
  - use as needed: `auto`.
900996da577a pager: move most help to a new help topic and deprecate extension
Augie Fackler <augie@google.com>
parents:
diff changeset
    26
  - require the pager: `yes` or `on`.
900996da577a pager: move most help to a new help topic and deprecate extension
Augie Fackler <augie@google.com>
parents:
diff changeset
    27
  - suppress the pager: `no` or `off` (any unrecognized value
900996da577a pager: move most help to a new help topic and deprecate extension
Augie Fackler <augie@google.com>
parents:
diff changeset
    28
  will also work).
31062
88203f26ea57 pager: add a config knob to just globally turn off the pager
Augie Fackler <augie@google.com>
parents: 31061
diff changeset
    29
88203f26ea57 pager: add a config knob to just globally turn off the pager
Augie Fackler <augie@google.com>
parents: 31061
diff changeset
    30
To globally turn off all attempts to use a pager, set::
88203f26ea57 pager: add a config knob to just globally turn off the pager
Augie Fackler <augie@google.com>
parents: 31061
diff changeset
    31
88203f26ea57 pager: add a config knob to just globally turn off the pager
Augie Fackler <augie@google.com>
parents: 31061
diff changeset
    32
  [pager]
88203f26ea57 pager: add a config knob to just globally turn off the pager
Augie Fackler <augie@google.com>
parents: 31061
diff changeset
    33
  enable = false
88203f26ea57 pager: add a config knob to just globally turn off the pager
Augie Fackler <augie@google.com>
parents: 31061
diff changeset
    34
88203f26ea57 pager: add a config knob to just globally turn off the pager
Augie Fackler <augie@google.com>
parents: 31061
diff changeset
    35
which will prevent the pager from running.