##// END OF EJS Templates
peer: introduce a limitedarguments attributes...
marmoute -
r42334:69921d02 default
parent child Browse files
Show More
@@ -382,6 +382,7 b' class httppeer(wireprotov1peer.wirepeer)'
382 382 self._path = path
383 383 self._url = url
384 384 self._caps = caps
385 self.limitedarguments = caps is not None and 'httppostargs' not in caps
385 386 self._urlopener = opener
386 387 self._requestbuilder = requestbuilder
387 388
@@ -750,6 +751,9 b' class httpv2executor(object):'
750 751
751 752 @interfaceutil.implementer(repository.ipeerv2)
752 753 class httpv2peer(object):
754
755 limitedarguments = False
756
753 757 def __init__(self, ui, repourl, apipath, opener, requestbuilder,
754 758 apidescriptor):
755 759 self.ui = ui
@@ -291,6 +291,10 b' class ipeercommandexecutor(interfaceutil'
291 291 class ipeerrequests(interfaceutil.Interface):
292 292 """Interface for executing commands on a peer."""
293 293
294 limitedarguments = interfaceutil.Attribute(
295 """True if the peer cannot receive large argument value for commands."""
296 )
297
294 298 def commandexecutor():
295 299 """A context manager that resolves to an ipeercommandexecutor.
296 300
@@ -329,6 +333,8 b' class ipeerv2(ipeerconnection, ipeercapa'
329 333 class peer(object):
330 334 """Base class for peer repositories."""
331 335
336 limitedarguments = False
337
332 338 def capable(self, name):
333 339 caps = self.capabilities()
334 340 if name in caps:
General Comments 0
You need to be logged in to leave comments. Login now