comparison tests/test-check-interfaces.py @ 37545:93397c4633f6

wireproto: extract HTTP version 2 code to own module wireprotoserver has generic and version 1 server code. The wireproto module also has both version 1 and version 2 command implementations. Upcoming work I want to do will make it difficult for this code to live in the current locations. Plus, it kind of makes sense for the version 2 code to live in an isolated module. This commit copies the HTTPv2 bits from wireprotoserver into a new module. We do it as a file copy to preserve history. A future commit will be copying wire protocol commands into this module as well. But there is little history of that code, so it makes sense to take history for wireprotoserver. Differential Revision: https://phab.mercurial-scm.org/D3230
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 09 Apr 2018 19:35:04 -0700
parents a3202fa83aff
children 835ccc2a5ef1
comparison
equal deleted inserted replaced
37544:55b5ba8d4e68 37545:93397c4633f6
21 ui as uimod, 21 ui as uimod,
22 unionrepo, 22 unionrepo,
23 vfs as vfsmod, 23 vfs as vfsmod,
24 wireprotoserver, 24 wireprotoserver,
25 wireprototypes, 25 wireprototypes,
26 wireprotov2server,
26 ) 27 )
27 28
28 rootdir = os.path.normpath(os.path.join(os.path.dirname(__file__), '..')) 29 rootdir = os.path.normpath(os.path.join(os.path.dirname(__file__), '..'))
29 30
30 def checkzobject(o, allowextra=False): 31 def checkzobject(o, allowextra=False):
123 ziverify.verifyClass(wireprototypes.baseprotocolhandler, 124 ziverify.verifyClass(wireprototypes.baseprotocolhandler,
124 wireprotoserver.sshv2protocolhandler) 125 wireprotoserver.sshv2protocolhandler)
125 ziverify.verifyClass(wireprototypes.baseprotocolhandler, 126 ziverify.verifyClass(wireprototypes.baseprotocolhandler,
126 wireprotoserver.httpv1protocolhandler) 127 wireprotoserver.httpv1protocolhandler)
127 ziverify.verifyClass(wireprototypes.baseprotocolhandler, 128 ziverify.verifyClass(wireprototypes.baseprotocolhandler,
128 wireprotoserver.httpv2protocolhandler) 129 wireprotov2server.httpv2protocolhandler)
129 130
130 sshv1 = wireprotoserver.sshv1protocolhandler(None, None, None) 131 sshv1 = wireprotoserver.sshv1protocolhandler(None, None, None)
131 checkzobject(sshv1) 132 checkzobject(sshv1)
132 sshv2 = wireprotoserver.sshv2protocolhandler(None, None, None) 133 sshv2 = wireprotoserver.sshv2protocolhandler(None, None, None)
133 checkzobject(sshv2) 134 checkzobject(sshv2)
134 135
135 httpv1 = wireprotoserver.httpv1protocolhandler(None, None, None) 136 httpv1 = wireprotoserver.httpv1protocolhandler(None, None, None)
136 checkzobject(httpv1) 137 checkzobject(httpv1)
137 httpv2 = wireprotoserver.httpv2protocolhandler(None, None) 138 httpv2 = wireprotov2server.httpv2protocolhandler(None, None)
138 checkzobject(httpv2) 139 checkzobject(httpv2)
139 140
140 ziverify.verifyClass(repository.ifilestorage, filelog.filelog) 141 ziverify.verifyClass(repository.ifilestorage, filelog.filelog)
141 142
142 vfs = vfsmod.vfs('.') 143 vfs = vfsmod.vfs('.')