Mercurial > hg
diff hgext/largefiles/uisetup.py @ 37785:b4d85bc122bd
wireproto: rename wireproto to wireprotov1server (API)
We have wireprotov2server, wireprotov1peer, and wireprotov2peer.
wireproto only contains server functionality. So it makes sense to
rename it to wireprotov1server so the naming aligns with everything
else.
Differential Revision: https://phab.mercurial-scm.org/D3400
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 16 Apr 2018 22:21:54 -0700 |
parents | c22fd3c4c23e |
children | 823a580448d7 |
line wrap: on
line diff
--- a/hgext/largefiles/uisetup.py Mon Apr 16 22:10:02 2018 -0700 +++ b/hgext/largefiles/uisetup.py Mon Apr 16 22:21:54 2018 -0700 @@ -31,7 +31,7 @@ subrepo, upgrade, url, - wireproto, + wireprotov1server, ) from . import ( @@ -164,22 +164,24 @@ overrides.openlargefile) # create the new wireproto commands ... - wireproto.wireprotocommand('putlfile', 'sha', permission='push')( + wireprotov1server.wireprotocommand('putlfile', 'sha', permission='push')( proto.putlfile) - wireproto.wireprotocommand('getlfile', 'sha', permission='pull')( + wireprotov1server.wireprotocommand('getlfile', 'sha', permission='pull')( proto.getlfile) - wireproto.wireprotocommand('statlfile', 'sha', permission='pull')( + wireprotov1server.wireprotocommand('statlfile', 'sha', permission='pull')( proto.statlfile) - wireproto.wireprotocommand('lheads', '', permission='pull')( - wireproto.heads) + wireprotov1server.wireprotocommand('lheads', '', permission='pull')( + wireprotov1server.heads) # ... and wrap some existing ones - extensions.wrapfunction(wireproto.commands['heads'], 'func', proto.heads) + extensions.wrapfunction(wireprotov1server.commands['heads'], 'func', + proto.heads) # TODO also wrap wireproto.commandsv2 once heads is implemented there. extensions.wrapfunction(webcommands, 'decodepath', overrides.decodepath) - extensions.wrapfunction(wireproto, '_capabilities', proto._capabilities) + extensions.wrapfunction(wireprotov1server, '_capabilities', + proto._capabilities) # can't do this in reposetup because it needs to have happened before # wirerepo.__init__ is called