pager: use less as a fallback on Unix
This seems reasonable choice per discussion, and the default-default of Git.
See also the inline-comment for why.
https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-April/097042.html
test-bookmarks: factor hooks out to a shell script for Windows
The previous incarnation of the hooks weren't being run on Windows, which
altered the DAG and hashes[1].
[1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-April/096987.html
log: document the characters ---graph uses to draw
The meaning of : vs | was undocumented and non-obvious.
tests: demonstrate that pager.attend-<abbreviated> doesn't work
A pager.attend-* value that isn't a full command or alias name doesn't
work. We add explicit test coverage of this to demonstrate it.
tests: test that abbreviated command alias is also paged
Explicit test coverage is good.
tests: drop unnecessary pager attend in test
`log` is attended by default. We don't need to specify pager.attend-log
in this test.
hgweb: change text of followlines links to "older / newer"
DAG directions "descending" / "ascending" arguably do not make much sense in
the web interface where changes are usually listed by "dates".
hgweb: do not show "descending" link in followlines UI for filelog heads
When on a filelog head, we are certain that there will be no descendant so the
target of the "descending" link will lead to an empty log result. Do not
display the link in this case.
context: optimize linkrev adjustment in blockancestors() (
issue5538)
We set parent._descendantrev = child.rev() when walking parents in
blockancestors() so that, when linkrev adjustment is perform for these, it
starts from a close descendant instead of possibly topmost introrev. (See
`self._adjustlinkrev(self._descendantrev)` in filectx._changeid().)
This is similar to changeset
c82d88dfaf59, which added a "f._changeid"
instruction in annotate() for the same purpose.
However, here, we set _descendantrev explicitly instead of relying on the
'_changeid' cached property being accessed (with effect to set _changeid
attribute) so that, in _parentfilectx() (called from parents()), we go through
`if '_changeid' in vars(self) [...]` branch in which instruction
`fctx._descendantrev = self.rev()` finally appears and does what we want.
With this, we can roughly get a 3x speedup (including in example of
issue5538
from mozilla-central repository) on usage of followlines revset (and
equivalent hgweb request).