show: use filter() function to strip "tip" tag
Before, an empty tag "" was inserted in place of "tip", resulting in double
spaces.
templater: extend filter() to accept template expression for emptiness test
This utilizes the pass-by-name nature of template arguments.
templater: introduce filter() function to remove empty items from list
The primary use case is to filter out "tip" from a list of tags.
templater: fix truth testing of integer 0 taken from a list/dict
Broken at
f9c426385853. bool(python_value) shouldn't be used here since
an integer 0 has to be truthy for backward compatibility.
formatter: look for template symbols from the associated name
Otherwise symbolsused() would fail if a named template is specified with -T.
py3: add b'' prefixes in tests/test-obsolete-divergent.t
This makes the test pass on Python 3.
# skip-blame because just b'' prefixes.
Differential Revision: https://phab.mercurial-scm.org/D3832
py3: use stringutil.pprint() to print NoneType
Before this patch, when running test-debugcommands.t, we get a TypeError because
NoneType can't be converted into bytes. This patch uses stringutil.pprint() to
print the ui._colormode.
We are now close to getting test-debugcommands.t passing on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D3831
rebase: make dry-run return 1 or 0 according to result
In dry-run mode, if there is no conflict return 0, if any then return 1
Differential Revision: https://phab.mercurial-scm.org/D3829