hgext/simple4server.py
changeset 875 10867a8e27c6
parent 874 19a7ed6384a9
child 876 8c9601a6c4e0
--- a/hgext/simple4server.py	Mon Mar 10 17:40:38 2014 -0700
+++ b/hgext/simple4server.py	Mon Mar 10 21:34:36 2014 -0700
@@ -223,5 +223,11 @@
     hgweb_mod.perms['evoext_obshash'] = 'pull'
     wireproto.commands['evoext_pushobsmarkers_0'] = (srv_pushobsmarkers, '')
     wireproto.commands['evoext_pullobsmarkers_0'] = (srv_pullobsmarkers, '*')
+    # wrap module content
     extensions.wrapfunction(wireproto, 'capabilities', capabilities)
+    # wrap command content
+    oldcap, args = wireproto.commands['capabilities']
+    def newcap(repo, proto):
+        return capabilities(oldcap, repo, proto)
+    wireproto.commands['capabilities'] = (newcap, args)
     wireproto.commands['evoext_obshash'] = (srv_obshash, 'nodes')