Mercurial > evolve
comparison hgext/evolve.py @ 875:10867a8e27c6
exchange: properly wrap wireprotocol capabilities
Just wrapping the module function only works for ssh. Ssh gets capability
through the `hello` command. We also need to wrap the function stored in the
command dict. This fix discovery for http peer.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Mon, 10 Mar 2014 21:34:36 -0700 |
parents | 66bbbb96f5e0 |
children | cf35f38d6a10 |
comparison
equal
deleted
inserted
replaced
874:19a7ed6384a9 | 875:10867a8e27c6 |
---|---|
2453 hgweb_mod.perms['evoext_pushobsmarkers_0'] = 'push' | 2453 hgweb_mod.perms['evoext_pushobsmarkers_0'] = 'push' |
2454 hgweb_mod.perms['evoext_pullobsmarkers_0'] = 'pull' | 2454 hgweb_mod.perms['evoext_pullobsmarkers_0'] = 'pull' |
2455 hgweb_mod.perms['evoext_obshash'] = 'pull' | 2455 hgweb_mod.perms['evoext_obshash'] = 'pull' |
2456 wireproto.commands['evoext_pushobsmarkers_0'] = (srv_pushobsmarkers, '') | 2456 wireproto.commands['evoext_pushobsmarkers_0'] = (srv_pushobsmarkers, '') |
2457 wireproto.commands['evoext_pullobsmarkers_0'] = (srv_pullobsmarkers, '*') | 2457 wireproto.commands['evoext_pullobsmarkers_0'] = (srv_pullobsmarkers, '*') |
2458 # wrap command content | |
2459 oldcap, args = wireproto.commands['capabilities'] | |
2460 def newcap(repo, proto): | |
2461 return capabilities(oldcap, repo, proto) | |
2462 wireproto.commands['capabilities'] = (newcap, args) | |
2458 wireproto.commands['evoext_obshash'] = (srv_obshash, 'nodes') | 2463 wireproto.commands['evoext_obshash'] = (srv_obshash, 'nodes') |