Mercurial > hg
diff hgext/largefiles/__init__.py @ 46200:bd31462a86a2
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
author | Joerg Sonnenberger <joerg@bec.de> |
---|---|
date | Mon, 28 Dec 2020 03:18:16 +0100 |
parents | 89a2afe31e82 |
children | eb01d6d00a50 |
line wrap: on
line diff
--- a/hgext/largefiles/__init__.py Thu Jan 07 11:51:18 2021 +0100 +++ b/hgext/largefiles/__init__.py Mon Dec 28 03:18:16 2020 +0100 @@ -190,13 +190,6 @@ ) # TODO also wrap wireproto.commandsv2 once heads is implemented there. - # can't do this in reposetup because it needs to have happened before - # wirerepo.__init__ is called - proto.ssholdcallstream = sshpeer.sshv1peer._callstream - proto.httpoldcallstream = httppeer.httppeer._callstream - sshpeer.sshv1peer._callstream = proto.sshrepocallstream - httppeer.httppeer._callstream = proto.httprepocallstream - # override some extensions' stuff as well for name, module in extensions.extensions(): if name == b'rebase':