hgext/largefiles/proto.py
changeset 41062 0a7f582f6f1f
parent 37614 a81d02ea65db
child 43076 2372284d9457
--- a/hgext/largefiles/proto.py	Sun Dec 23 17:26:25 2018 -0500
+++ b/hgext/largefiles/proto.py	Sun Dec 23 22:57:03 2018 -0500
@@ -11,10 +11,12 @@
 
 from mercurial import (
     error,
+    exthelper,
     httppeer,
     util,
     wireprototypes,
     wireprotov1peer,
+    wireprotov1server,
 )
 
 from . import (
@@ -28,6 +30,8 @@
                            '\n\nPlease enable it in your Mercurial config '
                            'file.\n')
 
+eh = exthelper.exthelper()
+
 # these will all be replaced by largefiles.uisetup
 ssholdcallstream = None
 httpoldcallstream = None
@@ -162,6 +166,7 @@
     repo.__class__ = lfileswirerepository
 
 # advertise the largefiles=serve capability
+@eh.wrapfunction(wireprotov1server, '_capabilities')
 def _capabilities(orig, repo, proto):
     '''announce largefile server capability'''
     caps = orig(repo, proto)