mercurial/help/pager.txt
author Martin von Zweigbergk <martinvonz@google.com>
Fri, 21 Jun 2019 16:59:29 -0700
changeset 42590 ab416b5d9b91
parent 32140 85b978031a75
permissions -rw-r--r--
tests: add more tests of copy tracing with removed and re-added files We had a test where the destination of a copy was removed and then added back. This patch adds similar cases where the break in history instead happens to the source file. There are three versions of this: 1. The break happens before the rename. 2. The break happens on a branch parallel to the rename (where copy tracing is done via the merge base) 3. The source is added on each side of the merge base. The break in history is thus in the form of a deletion when going backwards to the merge base and the re-add happens on the other branch. I've also added calls to `hg graft` in these cases to show the breakage in issue 6163. Another factor in these cases is matching nodeid (checked in copies._tracefile()). I've made two copies each of the cases to show the impact of that. One of these is the same as a test in test-rename-merge1.t, so I also deleted that test from there. Some of these tests currently fail, where "fail" is based on my current thinking of how things should work. I had initially thought that we should be more strict about not tracing copies across commits where the file did not exist, but issue 6163 made me reconsider. The only test case here that behaved differently in 4.9 is the exact case reported in issue 6163. Differential Revision: https://phab.mercurial-scm.org/D6599
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
32112
edbbd18a47ab help: attempt to clarify that pager usage is not output length based
Matt Harbison <matt_harbison@yahoo.com>
parents: 32111
diff changeset
     1
Some Mercurial commands can produce a lot of output, and Mercurial will
31081
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
32140
85b978031a75 help: clarify the choice of pager
Xavier Lepaul <xalep@google.com>
parents: 32112
diff changeset
     9
If no pager is set in the user or repository configuration, Mercurial uses the
85b978031a75 help: clarify the choice of pager
Xavier Lepaul <xalep@google.com>
parents: 32112
diff changeset
    10
environment variable $PAGER. If $PAGER is not set, pager.pager from the default
85b978031a75 help: clarify the choice of pager
Xavier Lepaul <xalep@google.com>
parents: 32112
diff changeset
    11
or system configuration is used. If none of these are set, a default pager will
85b978031a75 help: clarify the choice of pager
Xavier Lepaul <xalep@google.com>
parents: 32112
diff changeset
    12
be used, typically `less` on Unix and `more` on Windows.
31081
900996da577a pager: move most help to a new help topic and deprecate extension
Augie Fackler <augie@google.com>
parents:
diff changeset
    13
32111
c4eb23116a09 help: document color/pager pitfalls on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 32104
diff changeset
    14
.. container:: windows
c4eb23116a09 help: document color/pager pitfalls on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 32104
diff changeset
    15
c4eb23116a09 help: document color/pager pitfalls on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 32104
diff changeset
    16
  On Windows, `more` is not color aware, so using it effectively disables color.
c4eb23116a09 help: document color/pager pitfalls on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 32104
diff changeset
    17
  MSYS and Cygwin shells provide `less` as a pager, which can be configured to
c4eb23116a09 help: document color/pager pitfalls on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 32104
diff changeset
    18
  support ANSI color codes.  See :hg:`help config.color.pagermode` to configure
c4eb23116a09 help: document color/pager pitfalls on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 32104
diff changeset
    19
  the color mode when invoking a pager.
c4eb23116a09 help: document color/pager pitfalls on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 32104
diff changeset
    20
31081
900996da577a pager: move most help to a new help topic and deprecate extension
Augie Fackler <augie@google.com>
parents:
diff changeset
    21
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
    22
pager.ignore list::
900996da577a pager: move most help to a new help topic and deprecate extension
Augie Fackler <augie@google.com>
parents:
diff changeset
    23
900996da577a pager: move most help to a new help topic and deprecate extension
Augie Fackler <augie@google.com>
parents:
diff changeset
    24
  [pager]
900996da577a pager: move most help to a new help topic and deprecate extension
Augie Fackler <augie@google.com>
parents:
diff changeset
    25
  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
    26
900996da577a pager: move most help to a new help topic and deprecate extension
Augie Fackler <augie@google.com>
parents:
diff changeset
    27
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
    28
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
    29
900996da577a pager: move most help to a new help topic and deprecate extension
Augie Fackler <augie@google.com>
parents:
diff changeset
    30
To control whether the pager is used at all for an individual command,
32084
091d6b9157da help: apply bulk fixes for indentation and literal blocking issues
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32081
diff changeset
    31
you can use --pager=<value>:
31081
900996da577a pager: move most help to a new help topic and deprecate extension
Augie Fackler <augie@google.com>
parents:
diff changeset
    32
900996da577a pager: move most help to a new help topic and deprecate extension
Augie Fackler <augie@google.com>
parents:
diff changeset
    33
  - 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
    34
  - 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
    35
  - suppress the pager: `no` or `off` (any unrecognized value
32084
091d6b9157da help: apply bulk fixes for indentation and literal blocking issues
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32081
diff changeset
    36
    will also work).
31082
88203f26ea57 pager: add a config knob to just globally turn off the pager
Augie Fackler <augie@google.com>
parents: 31081
diff changeset
    37
88203f26ea57 pager: add a config knob to just globally turn off the pager
Augie Fackler <augie@google.com>
parents: 31081
diff changeset
    38
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: 31081
diff changeset
    39
32104
f06d23af6cdf pager: rename 'pager.enable' to 'ui.paginate'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 32084
diff changeset
    40
  [ui]
f06d23af6cdf pager: rename 'pager.enable' to 'ui.paginate'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 32084
diff changeset
    41
  paginate = never
31082
88203f26ea57 pager: add a config knob to just globally turn off the pager
Augie Fackler <augie@google.com>
parents: 31081
diff changeset
    42
88203f26ea57 pager: add a config knob to just globally turn off the pager
Augie Fackler <augie@google.com>
parents: 31081
diff changeset
    43
which will prevent the pager from running.