largefiles: redo heads interception
The largefiles extension replaces the "heads" wire command and tries to
redirect all uses towards the custom "lheads" wire command. As seen in
issue6384, this doesn't currently work for ssh. Instead of hooking into
the _callstream interface, properly register the command for the peer
instance and monkeypatch the executor to do the redirection. This works
transparently for both all kinds of peers and both for the batch and
non-batch case.
Differential Revision: https://phab.mercurial-scm.org/D9663
edition = "2018"
max_width = 79
wrap_comments = true
error_on_line_overflow = true