Mercurial > hg
annotate tests/test-gendoc-it.t @ 31690:2d11d278279a
ui: defer setting pager related properties until the pager has spawned
When --pager=on is given, dispatch.py spawns a pager before setting up color.
If the pager failed to launch, ui.pageractive was left set to True, so color
configured itself based on 'color.pagermode'. A typical MSYS setting would be
'color.mode=auto, color.pagermode=ansi'. In the failure case, this would print
a warning, disable the pager, and then print the raw ANSI codes to the terminal.
Care needs to be taken, because it appears that leaving ui.pageractive=True was
the only thing that prevented an attempt at running the pager again from inside
the command. This results in a double warning message, so pager is simply
disabled on failure.
The ui config settings didn't need to be moved to fix this, but it seemed like
the right thing to do for consistency.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sat, 25 Mar 2017 21:12:00 -0400 |
parents | 7a1ad08b9ff5 |
children |
rev | line source |
---|---|
28809
7a1ad08b9ff5
tests: splitting test-gendoc.t into per file tests
timeless <timeless@mozdev.org>
parents:
diff
changeset
|
1 #require docutils gettext |
7a1ad08b9ff5
tests: splitting test-gendoc.t into per file tests
timeless <timeless@mozdev.org>
parents:
diff
changeset
|
2 |
7a1ad08b9ff5
tests: splitting test-gendoc.t into per file tests
timeless <timeless@mozdev.org>
parents:
diff
changeset
|
3 $ $TESTDIR/check-gendoc it |
7a1ad08b9ff5
tests: splitting test-gendoc.t into per file tests
timeless <timeless@mozdev.org>
parents:
diff
changeset
|
4 checking for parse errors |