mercurial/wireproto.py
changeset 37320 39f7d4ee8bcd
parent 37295 45b39c69fae0
child 37353 ac666c5c2e0c
equal deleted inserted replaced
37319:36d17f37db91 37320:39f7d4ee8bcd
   190     Methods commonly call wire protocol commands of the same name.
   190     Methods commonly call wire protocol commands of the same name.
   191 
   191 
   192     See also httppeer.py and sshpeer.py for protocol-specific
   192     See also httppeer.py and sshpeer.py for protocol-specific
   193     implementations of this interface.
   193     implementations of this interface.
   194     """
   194     """
   195     # Begin of basewirepeer interface.
   195     # Begin of ipeercommands interface.
   196 
   196 
   197     def iterbatch(self):
   197     def iterbatch(self):
   198         return remoteiterbatcher(self)
   198         return remoteiterbatcher(self)
   199 
   199 
   200     @batchable
   200     @batchable
   351             # bundle2 push. Send a stream, fetch a stream.
   351             # bundle2 push. Send a stream, fetch a stream.
   352             stream = self._calltwowaystream('unbundle', cg, heads=heads)
   352             stream = self._calltwowaystream('unbundle', cg, heads=heads)
   353             ret = bundle2.getunbundler(self.ui, stream)
   353             ret = bundle2.getunbundler(self.ui, stream)
   354         return ret
   354         return ret
   355 
   355 
   356     # End of basewirepeer interface.
   356     # End of ipeercommands interface.
   357 
   357 
   358     # Begin of baselegacywirepeer interface.
   358     # Begin of ipeerlegacycommands interface.
   359 
   359 
   360     def branches(self, nodes):
   360     def branches(self, nodes):
   361         n = encodelist(nodes)
   361         n = encodelist(nodes)
   362         d = self._call("branches", nodes=n)
   362         d = self._call("branches", nodes=n)
   363         try:
   363         try:
   389         heads = encodelist(heads)
   389         heads = encodelist(heads)
   390         f = self._callcompressable("changegroupsubset",
   390         f = self._callcompressable("changegroupsubset",
   391                                    bases=bases, heads=heads)
   391                                    bases=bases, heads=heads)
   392         return changegroupmod.cg1unpacker(f, 'UN')
   392         return changegroupmod.cg1unpacker(f, 'UN')
   393 
   393 
   394     # End of baselegacywirepeer interface.
   394     # End of ipeerlegacycommands interface.
   395 
   395 
   396     def _submitbatch(self, req):
   396     def _submitbatch(self, req):
   397         """run batch request <req> on the server
   397         """run batch request <req> on the server
   398 
   398 
   399         Returns an iterator of the raw responses from the server.
   399         Returns an iterator of the raw responses from the server.