comparison mercurial/httppeer.py @ 37614:a81d02ea65db

wireproto: move version 1 peer functionality to standalone module (API) wireproto.py contains code for both the client and the server. There *should* be a somewhat strong separation between the two. This commit extracts the client-side code from wireproto.py into a new module - wireprotov1peer. Differential Revision: https://phab.mercurial-scm.org/D3259
author Gregory Szorc <gregory.szorc@gmail.com>
date Wed, 11 Apr 2018 12:49:08 -0700
parents ae8730877371
children 77c9ee77687c
comparison
equal deleted inserted replaced
37613:96d735601ca1 37614:a81d02ea65db
32 url as urlmod, 32 url as urlmod,
33 util, 33 util,
34 wireproto, 34 wireproto,
35 wireprotoframing, 35 wireprotoframing,
36 wireprototypes, 36 wireprototypes,
37 wireprotov1peer,
37 wireprotov2server, 38 wireprotov2server,
38 ) 39 )
39 40
40 httplib = util.httplib 41 httplib = util.httplib
41 urlerr = util.urlerr 42 urlerr = util.urlerr
380 raise error.RepoError(_("'%s' uses newer protocol %s") % 381 raise error.RepoError(_("'%s' uses newer protocol %s") %
381 (safeurl, subtype)) 382 (safeurl, subtype))
382 383
383 return respurl, proto, resp 384 return respurl, proto, resp
384 385
385 class httppeer(wireproto.wirepeer): 386 class httppeer(wireprotov1peer.wirepeer):
386 def __init__(self, ui, path, url, opener, requestbuilder, caps): 387 def __init__(self, ui, path, url, opener, requestbuilder, caps):
387 self.ui = ui 388 self.ui = ui
388 self._path = path 389 self._path = path
389 self._url = url 390 self._url = url
390 self._caps = caps 391 self._caps = caps